Changeset 5641 for branches/QAP/HeuristicLab.Problems.QuadraticAssignment
- Timestamp:
- 03/09/11 03:23:32 (14 years ago)
- Location:
- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs
r5583 r5641 21 21 } 22 22 23 public DoubleMatrix ViewCoordinates { get; set; } 23 [Storable] 24 private DoubleMatrix viewCoordinates; 25 public DoubleMatrix ViewCoordinates { 26 get { return viewCoordinates; } 27 set { 28 bool changed = (viewCoordinates != value); 29 viewCoordinates = value; 30 if (changed) OnPropertyChanged("ViewCoordinates"); 31 } 32 } 24 33 25 34 [Storable] … … 76 85 assignment = cloner.Clone(original.assignment); 77 86 quality = cloner.Clone(original.quality); 87 viewCoordinates = cloner.Clone(original.viewCoordinates); 78 88 } 79 89 public QAPAssignment(DoubleMatrix weights, Permutation assignment) { -
branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
r5598 r5641 47 47 48 48 #region Parameter Properties 49 public ValueParameter<Permutation> BestKnownSolutionParameter {50 get { return ( ValueParameter<Permutation>)Parameters["BestKnownSolution"]; }51 } 52 public ValueParameter<DoubleMatrix> CoordinatesParameter {53 get { return ( ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; }54 } 55 public ValueParameter<DoubleMatrix> WeightsParameter {56 get { return ( ValueParameter<DoubleMatrix>)Parameters["Weights"]; }57 } 58 public ValueParameter<DoubleMatrix> DistanceMatrixParameter {59 get { return ( ValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }49 public IValueParameter<Permutation> BestKnownSolutionParameter { 50 get { return (IValueParameter<Permutation>)Parameters["BestKnownSolution"]; } 51 } 52 public IValueParameter<DoubleMatrix> CoordinatesParameter { 53 get { return (IValueParameter<DoubleMatrix>)Parameters["Coordinates"]; } 54 } 55 public IValueParameter<DoubleMatrix> WeightsParameter { 56 get { return (IValueParameter<DoubleMatrix>)Parameters["Weights"]; } 57 } 58 public IValueParameter<DoubleMatrix> DistanceMatrixParameter { 59 get { return (IValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; } 60 60 } 61 61 #endregion … … 288 288 QAPLIBParser parser = new QAPLIBParser(); 289 289 parser.Parse(filename); 290 if (parser.Error != null) throw parser.Error; 290 291 Coordinates = new DoubleMatrix(); 291 292 DistanceMatrix = new DoubleMatrix(parser.Distances); … … 303 304 QAPLIBParser parser = new QAPLIBParser(); 304 305 parser.Parse(stream); 306 if (parser.Error != null) throw parser.Error; 305 307 Coordinates = new DoubleMatrix(); 306 308 DistanceMatrix = new DoubleMatrix(parser.Distances); … … 319 321 QAPLIBSolutionParser solParser = new QAPLIBSolutionParser(); 320 322 solParser.Parse(solStream); 323 if (solParser.Error != null) throw solParser.Error; 321 324 BestKnownQuality = new DoubleValue(solParser.Qualiy); 322 325 BestKnownSolution = new Permutation(PermutationTypes.Absolute, solParser.Assignment);
Note: See TracChangeset
for help on using the changeset viewer.