Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11889


Ignore:
Timestamp:
02/04/15 15:40:40 (10 years ago)
Author:
bburlacu
Message:

#2215: Set matching properties when cloning in the BottomUpSimilarityCalculator. Always match variable names in the MaxCommonSubtreeSimilarityCalculator (remove property), add license header to SymbolicExpressionTreeNodeSimilarityComparer.cs.

Location:
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs

    r10563 r11889  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Core;
    324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SimilarityCalculators/BottomUpSimilarityCalculator.cs

    r11487 r11889  
    4343    protected BottomUpSimilarityCalculator(BottomUpSimilarityCalculator original, Cloner cloner)
    4444      : base(original, cloner) {
     45      MatchVariableWeights = original.MatchVariableWeights;
     46      MatchConstantValues = original.MatchConstantValues;
    4547    }
    4648
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SimilarityCalculators/MaxCommonSubtreeSimilarityCalculator.cs

    r11888 r11889  
    3333    [Storable]
    3434    private readonly SymbolicExpressionTreeNodeSimilarityComparer comparer;
    35     public bool MatchVariableNames {
    36       get { return comparer.MatchVariableNames; }
    37       set { comparer.MatchVariableNames = value; }
    38     }
    39 
    4035    public bool MatchVariableWeights {
    4136      get { return comparer.MatchVariableWeights; }
     
    5752    protected MaxCommonSubtreeSimilarityCalculator(MaxCommonSubtreeSimilarityCalculator original, Cloner cloner)
    5853      : base(original, cloner) {
     54      comparer = cloner.Clone(original.comparer);
    5955    }
    6056
     
    6763    }
    6864
    69     public MaxCommonSubtreeSimilarityCalculator(bool matchVariableNames, bool matchVariableWeights, bool matchConstantValues) {
     65    public MaxCommonSubtreeSimilarityCalculator(bool matchVariableWeights, bool matchConstantValues) {
    7066      comparer = new SymbolicExpressionTreeNodeSimilarityComparer {
    7167        MatchConstantValues = matchConstantValues,
    72         MatchVariableNames = matchVariableNames,
     68        MatchVariableNames = true,
    7369        MatchVariableWeights = matchVariableWeights
    7470      };
Note: See TracChangeset for help on using the changeset viewer.