Changeset 18132 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
- Timestamp:
- 12/15/21 11:50:57 (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol (added) merged: 18091,18093,18100,18112-18121,18123-18131
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 18093,18100,18112-18116,18118,18121,18123-18124,18129-18130
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
r17180 r18132 59 59 tempModelParentNode.RemoveSubtree(i); 60 60 61 var constantNode = new ConstantTreeNode(new Constant()) { Value = repValue };62 tempModelParentNode.InsertSubtree(i, constantNode);61 var numberNode = new NumberTreeNode(new Number()) { Value = repValue }; 62 tempModelParentNode.InsertSubtree(i, numberNode); 63 63 64 64 newQualityForImpactsCalculation = CalculateQualityForImpacts(tempModel, problemData, rows); … … 79 79 protected IEnumerable<double> CalculateReplacementValues(ISymbolicExpressionTreeNode node, ISymbolicExpressionTree sourceTree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, 80 80 IDataset dataset, IEnumerable<int> rows) { 81 //optimization: constant nodes return always the same value 82 ConstantTreeNode constantNode = node as ConstantTreeNode; 81 var numberNode = node as INumericTreeNode; 83 82 BinaryFactorVariableTreeNode binaryFactorNode = node as BinaryFactorVariableTreeNode; 84 83 FactorVariableTreeNode factorNode = node as FactorVariableTreeNode; 85 if ( constantNode != null) {86 yield return constantNode.Value;84 if (numberNode != null) { 85 yield return numberNode.Value; 87 86 } else if (binaryFactorNode != null) { 88 87 // valid replacements are either all off or all on
Note: See TracChangeset
for help on using the changeset viewer.