- Timestamp:
- 04/01/15 17:43:13 (10 years ago)
- Location:
- stable
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12103,12108,12110,12122
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12280 r12281 34 34 [StorableClass] 35 35 [Item("SymbolicExpressionTreeBottomUpSimilarityCalculator", "A similarity calculator which uses the tree bottom-up distance as a similarity metric.")] 36 public class SymbolicExpressionTreeBottomUpSimilarityCalculator : S ingleObjectiveSolutionSimilarityCalculator {36 public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SolutionSimilarityCalculator { 37 37 private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" }; 38 38 39 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { } 39 40 protected override bool IsCommutative { get { return true; } } 40 41 public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }42 41 43 42 [StorableConstructor] … … 63 62 64 63 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 64 if (leftSolution == rightSolution) 65 return 1.0; 66 65 67 var t1 = leftSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; 66 68 var t2 = rightSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
r12280 r12281 30 30 [StorableClass] 31 31 [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")] 32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 33 protected override bool IsCommutative { get { return true; } } 34 32 public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator { 35 33 [Storable] 36 34 private readonly SymbolicExpressionTreeNodeEqualityComparer comparer; … … 44 42 set { comparer.MatchConstantValues = value; } 45 43 } 44 45 protected override bool IsCommutative { get { return true; } } 46 46 47 47 [StorableConstructor]
Note: See TracChangeset
for help on using the changeset viewer.