Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/12 17:16:21 (12 years ago)
Author:
abeham
Message:

#1855:

  • Added IStorableContent to HungarianAlgorithm, LinearAssignmentProblem, and LAPAssignment (it was only storable, because the result is storable)
  • Added separate AfterDeserialization hook and renamed AttachEventHandlers to RegisterEventHandlers
  • Added cloning of rowNames and columnNames in LAPAssignment
  • Changed the default instance of the LinearAssignmentProblem
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.LinearAssignment/3.3/HungarianAlgorithm.cs

    r8124 r8183  
    3737  [Creatable("Algorithms")]
    3838  [StorableClass]
    39   public sealed class HungarianAlgorithm : EngineAlgorithm {
     39  public sealed class HungarianAlgorithm : EngineAlgorithm, IStorableContent {
     40    public string Filename { get; set; }
     41
    4042    #region Problem Properties
    4143    public override Type ProblemType {
     
    6870    private HungarianAlgorithm(HungarianAlgorithm original, Cloner cloner)
    6971      : base(original, cloner) {
    70       AttachEventHandlers();
     72      RegisterEventHandlers();
    7173    }
    7274    public HungarianAlgorithm()
     
    8385
    8486      UpdateAnalyzers();
    85       AttachEventHandlers();
     87      RegisterEventHandlers();
    8688
    8789      Problem = new LinearAssignmentProblem();
     
    121123    #region Helpers
    122124    [StorableHook(HookType.AfterDeserialization)]
    123     private void AttachEventHandlers() {
     125    private void AfterDeserialization() {
     126      RegisterEventHandlers();
     127    }
     128
     129    private void RegisterEventHandlers() {
    124130      if (Problem != null) {
    125131        Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
Note: See TracChangeset for help on using the changeset viewer.