Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/12 09:51:13 (12 years ago)
Author:
jkarder
Message:

#1331: merged r8086:8330 from trunk

Location:
branches/ScatterSearch (trunk integration)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)

  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.LinearAssignment/3.3/LAPAssignment.cs

    r8086 r8331  
    3030  [Item("LAP Assignment", "Represents a solution to the LAP.")]
    3131  [StorableClass]
    32   public sealed class LAPAssignment : Item, INotifyPropertyChanged {
     32  public sealed class LAPAssignment : Item, INotifyPropertyChanged, IStorableContent {
     33    public string Filename { get; set; }
    3334
    3435    [Storable]
     
    4041        costs = value;
    4142        if (changed) OnPropertyChanged("Costs");
     43      }
     44    }
     45
     46    [Storable]
     47    private StringArray rowNames;
     48    public StringArray RowNames {
     49      get { return rowNames; }
     50      set {
     51        bool changed = (rowNames != value);
     52        rowNames = value;
     53        if (changed) OnPropertyChanged("RowNames");
     54      }
     55    }
     56
     57    [Storable]
     58    private StringArray columnNames;
     59    public StringArray ColumnNames {
     60      get { return columnNames; }
     61      set {
     62        bool changed = (columnNames != value);
     63        columnNames = value;
     64        if (changed) OnPropertyChanged("ColumnNames");
    4265      }
    4366    }
     
    7194      costs = cloner.Clone(original.costs);
    7295      assignment = cloner.Clone(original.assignment);
     96      rowNames = cloner.Clone(original.rowNames);
     97      columnNames = cloner.Clone(original.columnNames);
    7398      quality = cloner.Clone(original.quality);
    7499    }
     
    81106      this.quality = quality;
    82107    }
     108    public LAPAssignment(DoubleMatrix costs, StringArray rowNames, StringArray columnNames, Permutation assignment)
     109      : this(costs, assignment) {
     110      this.rowNames = rowNames;
     111      this.columnNames = columnNames;
     112    }
     113    public LAPAssignment(DoubleMatrix costs, StringArray rowNames, StringArray columnNames, Permutation assignment, DoubleValue quality)
     114      : this(costs, rowNames, columnNames, assignment) {
     115      this.quality = quality;
     116    }
    83117
    84118    public override IDeepCloneable Clone(Cloner cloner) {
    85119      return new LAPAssignment(this, cloner);
    86120    }
    87 
    88121
    89122    public event PropertyChangedEventHandler PropertyChanged;
Note: See TracChangeset for help on using the changeset viewer.