- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Problems.Binary/3.3/BinaryProblem.cs
r12000 r15281 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 24 24 using System; 25 25 using System.Linq; 26 using HeuristicLab.Analysis; 26 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Core; … … 29 30 using HeuristicLab.Encodings.BinaryVectorEncoding; 30 31 using HeuristicLab.Optimization; 32 using HeuristicLab.Optimization.Operators; 31 33 using HeuristicLab.Parameters; 32 34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 61 63 Parameters.Add(lengthParameter); 62 64 Encoding.LengthParameter = lengthParameter; 65 Operators.Add(new HammingSimilarityCalculator()); 66 Operators.Add(new QualitySimilarityCalculator()); 67 Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>())); 68 Parameterize(); 63 69 RegisterEventHandlers(); 64 70 } … … 87 93 base.OnEncodingChanged(); 88 94 Encoding.LengthParameter = LengthParameter; 95 Parameterize(); 89 96 } 90 97 98 private void Parameterize() { 99 foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) { 100 similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.BinaryVectorParameter.ActualName; 101 similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName; 102 } 103 } 91 104 92 105 private void RegisterEventHandlers() {
Note: See TracChangeset
for help on using the changeset viewer.