Changeset 7621 for trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs
- Timestamp:
- 03/15/12 14:29:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs
r7558 r7621 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 93 94 if (dm == null) { // check again to avoid race condition 94 95 DoubleMatrix c = CoordinatesParameter.ActualValue; 96 if (c == null) throw new InvalidOperationException("Neither a distance matrix nor coordinates were given."); 95 97 dm = new DistanceMatrix(c.Rows, c.Rows); 96 98 for (int i = 0; i < dm.Rows; i++) { … … 111 113 Permutation p = PermutationParameter.ActualValue; 112 114 DoubleMatrix c = CoordinatesParameter.ActualValue; 113 115 if (c == null) throw new InvalidOperationException("No coordinates were given."); 114 116 double length = 0; 115 117 for (int i = 0; i < p.Length - 1; i++)
Note: See TracChangeset
for help on using the changeset viewer.