Changeset 5366 for trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing
- Timestamp:
- 01/24/11 17:38:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
r5356 r5366 136 136 } 137 137 private SimulatedAnnealingMainLoop MainLoop { 138 get { 139 return (SimulatedAnnealingMainLoop)( 140 (ResultsCollector)( 141 (VariableCreator)SolutionsCreator.Successor 142 ).Successor 143 ).Successor; 144 } 138 get { return FindMainLoop(SolutionsCreator.Successor); } 145 139 } 146 140 [Storable] … … 432 426 Analyzer.Operators.Add(qualityAnalyzer); 433 427 } 428 private SimulatedAnnealingMainLoop FindMainLoop(IOperator start) { 429 IOperator mainLoop = start; 430 while (mainLoop != null && !(mainLoop is SimulatedAnnealingMainLoop)) 431 mainLoop = ((SingleSuccessorOperator)mainLoop).Successor; 432 if (mainLoop == null) return null; 433 else return (SimulatedAnnealingMainLoop)mainLoop; 434 } 434 435 #endregion 435 436 }
Note: See TracChangeset
for help on using the changeset viewer.