Changeset 13396 for branches/ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers
- Timestamp:
- 11/25/15 16:22:37 (9 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs
r12012 r13396 36 36 [Item("BestQAPSolutionAnalyzer", "An operator for analyzing the best solution of Quadratic Assignment Problems.")] 37 37 [StorableClass] 38 public sealed class BestQAPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {38 public sealed class BestQAPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator, IPermutationSolutionsOperator { 39 39 public bool EnabledByDefault { 40 40 get { return true; } 41 41 } 42 42 43 public LookupParameter<BoolValue> MaximizationParameter {44 get { return ( LookupParameter<BoolValue>)Parameters["Maximization"]; }43 public ILookupParameter<BoolValue> MaximizationParameter { 44 get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; } 45 45 } 46 public LookupParameter<DoubleMatrix> DistancesParameter {47 get { return ( LookupParameter<DoubleMatrix>)Parameters["Distances"]; }46 public ILookupParameter<DoubleMatrix> DistancesParameter { 47 get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; } 48 48 } 49 public LookupParameter<DoubleMatrix> WeightsParameter {50 get { return ( LookupParameter<DoubleMatrix>)Parameters["Weights"]; }49 public ILookupParameter<DoubleMatrix> WeightsParameter { 50 get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; } 51 51 } 52 public ScopeTreeLookupParameter<Permutation> PermutationParameter {53 get { return ( ScopeTreeLookupParameter<Permutation>)Parameters["Permutation"]; }52 public IScopeTreeLookupParameter<Permutation> PermutationsParameter { 53 get { return (IScopeTreeLookupParameter<Permutation>)Parameters["Permutations"]; } 54 54 } 55 public ScopeTreeLookupParameter<DoubleValue> QualityParameter {56 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }55 public IScopeTreeLookupParameter<DoubleValue> QualityParameter { 56 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 57 57 } 58 public LookupParameter<QAPAssignment> BestSolutionParameter {59 get { return ( LookupParameter<QAPAssignment>)Parameters["BestSolution"]; }58 public ILookupParameter<QAPAssignment> BestSolutionParameter { 59 get { return (ILookupParameter<QAPAssignment>)Parameters["BestSolution"]; } 60 60 } 61 public ValueLookupParameter<ResultCollection> ResultsParameter {62 get { return ( ValueLookupParameter<ResultCollection>)Parameters["Results"]; }61 public IValueLookupParameter<ResultCollection> ResultsParameter { 62 get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; } 63 63 } 64 public LookupParameter<DoubleValue> BestKnownQualityParameter {65 get { return ( LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }64 public ILookupParameter<DoubleValue> BestKnownQualityParameter { 65 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 66 66 } 67 public LookupParameter<ItemSet<Permutation>> BestKnownSolutionsParameter {68 get { return ( LookupParameter<ItemSet<Permutation>>)Parameters["BestKnownSolutions"]; }67 public ILookupParameter<ItemSet<Permutation>> BestKnownSolutionsParameter { 68 get { return (ILookupParameter<ItemSet<Permutation>>)Parameters["BestKnownSolutions"]; } 69 69 } 70 public LookupParameter<Permutation> BestKnownSolutionParameter {71 get { return ( LookupParameter<Permutation>)Parameters["BestKnownSolution"]; }70 public ILookupParameter<Permutation> BestKnownSolutionParameter { 71 get { return (ILookupParameter<Permutation>)Parameters["BestKnownSolution"]; } 72 72 } 73 73 … … 83 83 Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances between the locations.")); 84 84 Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights between the facilities.")); 85 Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Permutation ", "The QAP solutions from which the best solution should be analyzed."));85 Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Permutations", "The QAP solutions from which the best solution should be analyzed.")); 86 86 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the QAP solutions which should be analyzed.")); 87 87 Parameters.Add(new LookupParameter<QAPAssignment>("BestSolution", "The best QAP solution.")); … … 109 109 DoubleMatrix distances = DistancesParameter.ActualValue; 110 110 DoubleMatrix weights = WeightsParameter.ActualValue; 111 ItemArray<Permutation> permutations = Permutation Parameter.ActualValue;111 ItemArray<Permutation> permutations = PermutationsParameter.ActualValue; 112 112 ItemArray<DoubleValue> qualities = QualityParameter.ActualValue; 113 113 ResultCollection results = ResultsParameter.ActualValue; -
branches/ProblemRefactoring/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/QAPAlleleFrequencyAnalyzer.cs
r12012 r13396 36 36 [StorableClass] 37 37 public sealed class QAPAlleleFrequencyAnalyzer : AlleleFrequencyAnalyzer<Permutation> { 38 public LookupParameter<DoubleMatrix> WeightsParameter {39 get { return ( LookupParameter<DoubleMatrix>)Parameters["Weights"]; }38 public ILookupParameter<DoubleMatrix> WeightsParameter { 39 get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; } 40 40 } 41 public LookupParameter<DoubleMatrix> DistancesParameter {42 get { return ( LookupParameter<DoubleMatrix>)Parameters["Distances"]; }41 public ILookupParameter<DoubleMatrix> DistancesParameter { 42 get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; } 43 43 } 44 44
Note: See TracChangeset
for help on using the changeset viewer.