Changeset 12049 for branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 02/21/15 15:55:47 (10 years ago)
- Location:
- branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r12030 r12049 119 119 set { ProblemDataParameter.Value = value; } 120 120 } 121 122 121 public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { 123 122 get { return SymbolicExpressionTreeGrammarParameter.Value; } … … 128 127 set { SymbolicExpressionTreeInterpreterParameter.Value = value; } 129 128 } 130 131 129 public IntValue MaximumSymbolicExpressionTreeDepth { 132 130 get { return MaximumSymbolicExpressionTreeDepthParameter.Value; } … … 144 142 get { return RelativeNumberOfEvaluatedSamplesParameter.Value; } 145 143 } 146 147 144 public IntRange FitnessCalculationPartition { 148 145 get { return FitnessCalculationPartitionParameter.Value; } … … 352 349 op.EvaluatorParameter.ActualName = EvaluatorParameter.Name; 353 350 } 351 foreach (var op in operators.OfType<SymbolicDataAnalysisBottomUpDiversityAnalyzer>()) { 352 var sim = op.SimilarityCalculator as SymbolicExpressionTreeBottomUpSimilarityCalculator; 353 if (sim == null) { 354 op.SimilarityCalculator = new SymbolicExpressionTreeBottomUpSimilarityCalculator { 355 SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName 356 }; 357 } else { 358 sim.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 359 } 360 } 354 361 } 355 362 -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
r12028 r12049 60 60 61 61 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 62 if (leftSolution == rightSolution) 63 return 1.0; 64 62 65 var t1 = leftSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; 63 66 var t2 = rightSolution.Variables[SolutionVariableName].Value as ISymbolicExpressionTree; -
branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12029 r12049 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 63 63 64 64 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 65 if (leftSolution == rightSolution) 66 return 1.0; 67 65 68 var leftValues = (DoubleArray)leftSolution.Variables["EstimatedValues"].Value; 66 69 var rightValues = (DoubleArray)rightSolution.Variables["EstimatedValues"].Value;
Note: See TracChangeset
for help on using the changeset viewer.