Changeset 18146 for branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
- Timestamp:
- 12/16/21 14:23:48 (3 years ago)
- Location:
- branches/3136_Structural_GP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
r17180 r18146 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.