Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/03/12 16:46:35 (12 years ago)
Author:
gkronber
Message:

#1847: merged r8084:8205 from trunk into GP move operators branch

Location:
branches/GP-MoveOperators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-MoveOperators

  • branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/HungarianAlgorithm.cs

    r8022 r8206  
    3434  /// A genetic algorithm.
    3535  /// </summary>
    36   [Item("HungarianAlgorithm", "The Hungarian algorithm can be used to solve the linear assignment problem in O(n^3). It is also known as the Kuhn–Munkres algorithm or Munkres assignment algorithm.")]
     36  [Item("Hungarian Algorithm", "The Hungarian algorithm can be used to solve the linear assignment problem in O(n^3). It is also known as the Kuhn–Munkres algorithm or Munkres assignment algorithm.")]
    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 {
     
    5254      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
    5355    }
    54 
    5556    #endregion
    5657
     
    6970    private HungarianAlgorithm(HungarianAlgorithm original, Cloner cloner)
    7071      : base(original, cloner) {
    71       // TODO: clone your private fields here
    72       AttachEventHandlers();
     72      RegisterEventHandlers();
    7373    }
    7474    public HungarianAlgorithm()
     
    8585
    8686      UpdateAnalyzers();
    87       AttachEventHandlers();
     87      RegisterEventHandlers();
     88
     89      Problem = new LinearAssignmentProblem();
    8890    }
    8991
     
    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.