Changeset 14249 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
- Timestamp:
- 08/09/16 15:34:33 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
r14243 r14249 43 43 //optimization: constant nodes return always the same value 44 44 ConstantTreeNode constantNode = node as ConstantTreeNode; 45 BinaryFactorVariableTreeNode factorNode = node as BinaryFactorVariableTreeNode; 45 BinaryFactorVariableTreeNode binaryFactorNode = node as BinaryFactorVariableTreeNode; 46 FactorVariableTreeNode factorNode = node as FactorVariableTreeNode; 46 47 if (constantNode != null) { 47 48 yield return constantNode.Value; 48 } else if ( factorNode != null) {49 } else if (binaryFactorNode != null) { 49 50 // valid replacements are either all off or all on 50 51 yield return 0; 51 52 yield return 1; 53 } else if (factorNode != null) { 54 foreach (var w in factorNode.Weights) yield return w; 55 yield return 0.0; 52 56 } else { 53 57 var rootSymbol = new ProgramRootSymbol().CreateTreeNode();
Note: See TracChangeset
for help on using the changeset viewer.