- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/Analyzers/BestLAPSolutionAnalyzer.cs
r8022 r8206 42 42 get { return (ILookupParameter<DoubleMatrix>)Parameters["Costs"]; } 43 43 } 44 public IValueLookupParameter<StringArray> RowNamesParameter { 45 get { return (IValueLookupParameter<StringArray>)Parameters["RowNames"]; } 46 } 47 public IValueLookupParameter<StringArray> ColumnNamesParameter { 48 get { return (IValueLookupParameter<StringArray>)Parameters["ColumnNames"]; } 49 } 44 50 public IScopeTreeLookupParameter<Permutation> AssignmentParameter { 45 51 get { return (IScopeTreeLookupParameter<Permutation>)Parameters["Assignment"]; } … … 71 77 Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem.")); 72 78 Parameters.Add(new LookupParameter<DoubleMatrix>("Costs", LinearAssignmentProblem.CostsDescription)); 79 Parameters.Add(new ValueLookupParameter<StringArray>("RowNames", LinearAssignmentProblem.RowNamesDescription)); 80 Parameters.Add(new ValueLookupParameter<StringArray>("ColumnNames", LinearAssignmentProblem.ColumnNamesDescription)); 73 81 Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Assignment", "The LAP solutions from which the best solution should be analyzed.")); 74 82 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the LAP solutions which should be analyzed.")); … … 86 94 public override IOperation Apply() { 87 95 var costs = CostsParameter.ActualValue; 96 var rowNames = RowNamesParameter.ActualValue; 97 var columnNames = ColumnNamesParameter.ActualValue; 88 98 var permutations = AssignmentParameter.ActualValue; 89 99 var qualities = QualityParameter.ActualValue; … … 122 132 LAPAssignment assignment = BestSolutionParameter.ActualValue; 123 133 if (assignment == null) { 124 assignment = new LAPAssignment(costs, (Permutation)permutations[i].Clone(), new DoubleValue(qualities[i].Value));134 assignment = new LAPAssignment(costs, rowNames, columnNames, (Permutation)permutations[i].Clone(), new DoubleValue(qualities[i].Value)); 125 135 BestSolutionParameter.ActualValue = assignment; 126 136 results.Add(new Result("Best LAP Solution", assignment)); … … 131 141 assignment.Assignment = (Permutation)permutations[i].Clone(); 132 142 assignment.Quality.Value = qualities[i].Value; 143 if (rowNames != null) 144 assignment.RowNames = rowNames; 145 else assignment.RowNames = null; 146 if (columnNames != null) 147 assignment.ColumnNames = columnNames; 148 else assignment.ColumnNames = null; 133 149 } 134 150 }
Note: See TracChangeset
for help on using the changeset viewer.