Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/11 03:23:32 (14 years ago)
Author:
abeham
Message:

#1330

  • worked on visualization (and MDS)
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  
    2121    }
    2222
    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    }
    2433
    2534    [Storable]
     
    7685      assignment = cloner.Clone(original.assignment);
    7786      quality = cloner.Clone(original.quality);
     87      viewCoordinates = cloner.Clone(original.viewCoordinates);
    7888    }
    7989    public QAPAssignment(DoubleMatrix weights, Permutation assignment) {
  • branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs

    r5598 r5641  
    4747
    4848    #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"]; }
    6060    }
    6161    #endregion
     
    288288      QAPLIBParser parser = new QAPLIBParser();
    289289      parser.Parse(filename);
     290      if (parser.Error != null) throw parser.Error;
    290291      Coordinates = new DoubleMatrix();
    291292      DistanceMatrix = new DoubleMatrix(parser.Distances);
     
    303304        QAPLIBParser parser = new QAPLIBParser();
    304305        parser.Parse(stream);
     306        if (parser.Error != null) throw parser.Error;
    305307        Coordinates = new DoubleMatrix();
    306308        DistanceMatrix = new DoubleMatrix(parser.Distances);
     
    319321          QAPLIBSolutionParser solParser = new QAPLIBSolutionParser();
    320322          solParser.Parse(solStream);
     323          if (solParser.Error != null) throw solParser.Error;
    321324          BestKnownQuality = new DoubleValue(solParser.Qualiy);
    322325          BestKnownSolution = new Permutation(PermutationTypes.Absolute, solParser.Assignment);
Note: See TracChangeset for help on using the changeset viewer.