Changeset 8206 for branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/HungarianAlgorithm.cs
- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/HungarianAlgorithm.cs
r8022 r8206 34 34 /// A genetic algorithm. 35 35 /// </summary> 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.")]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.")] 37 37 [Creatable("Algorithms")] 38 38 [StorableClass] 39 public sealed class HungarianAlgorithm : EngineAlgorithm { 39 public sealed class HungarianAlgorithm : EngineAlgorithm, IStorableContent { 40 public string Filename { get; set; } 41 40 42 #region Problem Properties 41 43 public override Type ProblemType { … … 52 54 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 53 55 } 54 55 56 #endregion 56 57 … … 69 70 private HungarianAlgorithm(HungarianAlgorithm original, Cloner cloner) 70 71 : base(original, cloner) { 71 // TODO: clone your private fields here 72 AttachEventHandlers(); 72 RegisterEventHandlers(); 73 73 } 74 74 public HungarianAlgorithm() … … 85 85 86 86 UpdateAnalyzers(); 87 AttachEventHandlers(); 87 RegisterEventHandlers(); 88 89 Problem = new LinearAssignmentProblem(); 88 90 } 89 91 … … 121 123 #region Helpers 122 124 [StorableHook(HookType.AfterDeserialization)] 123 private void AttachEventHandlers() { 125 private void AfterDeserialization() { 126 RegisterEventHandlers(); 127 } 128 129 private void RegisterEventHandlers() { 124 130 if (Problem != null) { 125 131 Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
Note: See TracChangeset
for help on using the changeset viewer.