Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/24/21 13:40:39 (2 years ago)
Author:
chaider
Message:

#3041

  • Renaming Constant Symbol to Num, behaves like before
  • Adding new Symbol RealConstant (Constant), this symbol behaves now like a real constant, won't be changed by parameter optimization or manipulators
  • Refactored classes part1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs

    r17180 r18093  
    120120
    121121    private void ChangeVariableValue(string variableName, double value) {
    122       foreach (var constNode in variableNodes[variableName].Cast<ConstantTreeNode>())
     122      foreach (var constNode in variableNodes[variableName].Cast<NumTreeNode>())
    123123        constNode.Value = value;
    124124
     
    223223    }
    224224
    225     private ISymbolicExpressionTreeNode MakeProduct(ConstantTreeNode c, double weight) {
     225    private ISymbolicExpressionTreeNode MakeProduct(NumTreeNode c, double weight) {
    226226      var mul = new Multiplication();
    227227      var prod = mul.CreateTreeNode();
     
    231231    }
    232232
    233     private ConstantTreeNode MakeConstantTreeNode(double value) {
    234       Constant constant = new Constant();
    235       constant.MinValue = value - 1;
    236       constant.MaxValue = value + 1;
    237       ConstantTreeNode constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
    238       constantTreeNode.Value = value;
    239       return constantTreeNode;
     233    private NumTreeNode MakeConstantTreeNode(double value) {
     234      Num num = new Num();
     235      num.MinValue = value - 1;
     236      num.MaxValue = value + 1;
     237      NumTreeNode numTreeNode = (NumTreeNode)num.CreateTreeNode();
     238      numTreeNode.Value = value;
     239      return numTreeNode;
    240240    }
    241241  }
Note: See TracChangeset for help on using the changeset viewer.