Changeset 11910 for branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
- Timestamp:
- 02/05/15 12:09:18 (10 years ago)
- Location:
- branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r11900 r11910 29 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 30 30 [StorableClass] 31 [Item(" MaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")]32 public class MaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {31 [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")] 32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 33 33 [Storable] 34 private readonly SymbolicExpressionTreeNode SimilarityComparer comparer;34 private readonly SymbolicExpressionTreeNodeEqualityComparer comparer; 35 35 public bool MatchVariableWeights { 36 36 get { return comparer.MatchVariableWeights; } … … 44 44 45 45 [StorableConstructor] 46 protected MaxCommonSubtreeSimilarityCalculator(bool deserializing) : base(deserializing) { }46 protected SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator(bool deserializing) : base(deserializing) { } 47 47 48 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new MaxCommonSubtreeSimilarityCalculator(this, cloner);49 return new SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator(this, cloner); 50 50 } 51 51 52 protected MaxCommonSubtreeSimilarityCalculator(MaxCommonSubtreeSimilarityCalculator original, Cloner cloner)52 protected SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator(SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator original, Cloner cloner) 53 53 : base(original, cloner) { 54 54 comparer = cloner.Clone(original.comparer); 55 55 } 56 56 57 public MaxCommonSubtreeSimilarityCalculator() {58 comparer = new SymbolicExpressionTreeNode SimilarityComparer {57 public SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator() { 58 comparer = new SymbolicExpressionTreeNodeEqualityComparer { 59 59 MatchConstantValues = true, 60 60 MatchVariableNames = true, … … 63 63 } 64 64 65 public MaxCommonSubtreeSimilarityCalculator(bool matchVariableWeights, bool matchConstantValues) {66 comparer = new SymbolicExpressionTreeNode SimilarityComparer {65 public SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator(bool matchVariableWeights, bool matchConstantValues) { 66 comparer = new SymbolicExpressionTreeNodeEqualityComparer { 67 67 MatchConstantValues = matchConstantValues, 68 68 MatchVariableNames = true,
Note: See TracChangeset
for help on using the changeset viewer.