Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/16 15:34:33 (8 years ago)
Author:
gkronber
Message:

#2650 added new symbol FactorVariable (renamed previous symbol to BinaryFactorVariable)
Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs

    r14243 r14249  
    4343      //optimization: constant nodes return always the same value
    4444      ConstantTreeNode constantNode = node as ConstantTreeNode;
    45       BinaryFactorVariableTreeNode factorNode = node as BinaryFactorVariableTreeNode;
     45      BinaryFactorVariableTreeNode binaryFactorNode = node as BinaryFactorVariableTreeNode;
     46      FactorVariableTreeNode factorNode = node as FactorVariableTreeNode;
    4647      if (constantNode != null) {
    4748        yield return constantNode.Value;
    48       } else if (factorNode != null) {
     49      } else if (binaryFactorNode != null) {
    4950        // valid replacements are either all off or all on
    5051        yield return 0;
    5152        yield return 1;
     53      } else if (factorNode != null) {
     54        foreach (var w in factorNode.Weights) yield return w;
     55        yield return 0.0;
    5256      } else {
    5357        var rootSymbol = new ProgramRootSymbol().CreateTreeNode();
Note: See TracChangeset for help on using the changeset viewer.