Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 18:15:15 (9 years ago)
Author:
ascheibe
Message:

#2310 merged r11950, r11951 into stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs

    r11947 r11964  
    3636  public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
    3737    private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" };
    38     public bool MatchVariableWeights { get; set; }
    39     public bool MatchConstantValues { get; set; }
    40 
    4138    public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
    4239
     
    4845    protected SymbolicExpressionTreeBottomUpSimilarityCalculator(SymbolicExpressionTreeBottomUpSimilarityCalculator original, Cloner cloner)
    4946      : base(original, cloner) {
    50       MatchVariableWeights = original.MatchVariableWeights;
    51       MatchConstantValues = original.MatchConstantValues;
    5247    }
    5348
     
    220215      var constant = node as ConstantTreeNode;
    221216      if (constant != null)
    222         return MatchConstantValues ? constant.Value.ToString(CultureInfo.InvariantCulture) : constant.Symbol.Name;
     217        return constant.Value.ToString(CultureInfo.InvariantCulture);
     218
    223219      var variable = node as VariableTreeNode;
    224       if (variable != null) {
    225         return MatchVariableWeights ? variable.Weight + variable.VariableName : variable.VariableName;
    226       }
     220      if (variable != null)
     221        return variable.Weight + variable.VariableName;
    227222
    228223      return node.ToString();
Note: See TracChangeset for help on using the changeset viewer.