Changeset 5366 for trunk/sources/HeuristicLab.Algorithms.NSGA2
- Timestamp:
- 01/24/11 17:38:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs
r5356 r5366 42 42 [StorableClass] 43 43 public class NSGA2 : EngineAlgorithm, IStorableContent { 44 public string Filename { get; set; } 45 44 46 #region Problem Properties 45 47 public override Type ProblemType { … … 143 145 } 144 146 private NSGA2MainLoop MainLoop { 145 get { 146 return (NSGA2MainLoop)( 147 (ResultsCollector)RankAndCrowdingSorter.Successor 148 ).Successor; 149 } 147 get { return FindMainLoop(RankAndCrowdingSorter.Successor); } 150 148 } 151 149 #endregion … … 392 390 Analyzer.Operators.Add(paretoFrontAnalyzer); 393 391 } 392 private NSGA2MainLoop FindMainLoop(IOperator start) { 393 IOperator mainLoop = start; 394 while (mainLoop != null && !(mainLoop is NSGA2MainLoop)) 395 mainLoop = ((SingleSuccessorOperator)mainLoop).Successor; 396 if (mainLoop == null) return null; 397 else return (NSGA2MainLoop)mainLoop; 398 } 394 399 #endregion 395 396 public string Filename {397 get;398 set;399 }400 400 } 401 401 }
Note: See TracChangeset
for help on using the changeset viewer.