Changeset 17628


Ignore:
Timestamp:
06/23/20 13:23:40 (3 months ago)
Author:
chaider
Message:

#3073

  • Added interval grammar for fixed scaling
  • Changed formatting
  • Fixed typos
Location:
branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r17590 r17628  
    224224    <Compile Include="Formatters\SymbolicDataAnalysisExpressionCSharpFormatter.cs" />
    225225    <Compile Include="Grammars\DataAnalysisGrammar.cs" />
     226    <Compile Include="Grammars\IntervalArithmeticGrammar.cs" />
    226227    <Compile Include="Hashing\HashExtensions.cs" />
    227228    <Compile Include="Hashing\HashUtil.cs" />
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs

    r17579 r17628  
    3737    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
    3838
    39     public IFixedValueParameter<IntValue> EvaluatedSolutionsParameter {
    40       get { return (IFixedValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
    41     }
     39    public IFixedValueParameter<IntValue> EvaluatedSolutionsParameter => (IFixedValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName];
    4240
    4341    public int EvaluatedSolutions {
    44       get { return EvaluatedSolutionsParameter.Value.Value; }
    45       set { EvaluatedSolutionsParameter.Value.Value = value; }
     42      get => EvaluatedSolutionsParameter.Value.Value;
     43      set => EvaluatedSolutionsParameter.Value.Value = value;
    4644    }
    4745
     
    8987
    9088      // because of numerical errors the bounds might be incorrect
    91       if (outputInterval.LowerBound <= outputInterval.UpperBound)
    92         return outputInterval;
    93       else
    94         return new Interval(outputInterval.UpperBound, outputInterval.LowerBound);
     89      return outputInterval.LowerBound <= outputInterval.UpperBound ? outputInterval : new Interval(outputInterval.UpperBound, outputInterval.LowerBound);
    9590    }
    9691
     
    279274
    280275    public static bool IsCompatible(ISymbolicExpressionTree tree) {
    281       var containsUnknownSyumbol = (
     276      var containsUnknownSymbols = (
    282277        from n in tree.Root.GetSubtree(0).IterateNodesPrefix()
    283278        where
     
    301296          !(n.Symbol is AnalyticQuotient)
    302297        select n).Any();
    303       return !containsUnknownSyumbol;
     298      return !containsUnknownSymbols;
    304299    }
    305300  }
Note: See TracChangeset for help on using the changeset viewer.