Changeset 6377 for branches/GP.Grammar.Editor/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators
- Timestamp:
- 06/07/11 12:49:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPEvaluator.cs
r5838 r6377 69 69 } 70 70 71 public static double Impact(int facility, Permutation assignment, DoubleMatrix weights, DoubleMatrix distances) { 72 double impact = 0; 73 for (int i = 0; i < assignment.Length; i++) { 74 impact += weights[facility, i] * distances[assignment[facility], assignment[i]]; 75 impact += weights[i, facility] * distances[assignment[i], assignment[facility]]; 76 } 77 return impact; 78 } 79 71 80 public override IOperation Apply() { 72 81 Permutation assignment = PermutationParameter.ActualValue;
Note: See TracChangeset
for help on using the changeset viewer.