- Timestamp:
- 01/24/11 17:38:42 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r5356 r5366 239 239 } 240 240 private IslandOffspringSelectionGeneticAlgorithmMainLoop MainLoop { 241 get { 242 return (IslandOffspringSelectionGeneticAlgorithmMainLoop)( 243 (ResultsCollector)( 244 (UniformSubScopesProcessor)( 245 (VariableCreator)IslandProcessor.Successor 246 ).Successor 247 ).Successor 248 ).Successor; 249 } 241 get { return FindMainLoop(IslandProcessor.Successor); } 250 242 } 251 243 [Storable] … … 625 617 Analyzer.Operators.Add(selectionPressureAnalyzer); 626 618 } 619 private IslandOffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) { 620 IOperator mainLoop = start; 621 while (mainLoop != null && !(mainLoop is IslandOffspringSelectionGeneticAlgorithmMainLoop)) 622 mainLoop = ((SingleSuccessorOperator)mainLoop).Successor; 623 if (mainLoop == null) return null; 624 else return (IslandOffspringSelectionGeneticAlgorithmMainLoop)mainLoop; 625 } 627 626 #endregion 628 627 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
r5356 r5366 191 191 } 192 192 private OffspringSelectionGeneticAlgorithmMainLoop MainLoop { 193 get { 194 return (OffspringSelectionGeneticAlgorithmMainLoop)( 195 (ResultsCollector)( 196 (SubScopesCounter)SolutionsCreator.Successor 197 ).Successor 198 ).Successor; 199 } 193 get { return FindMainLoop(SolutionsCreator.Successor); } 200 194 } 201 195 [Storable] … … 469 463 Analyzer.Operators.Add(selectionPressureAnalyzer); 470 464 } 465 private OffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) { 466 IOperator mainLoop = start; 467 while (mainLoop != null && !(mainLoop is OffspringSelectionGeneticAlgorithmMainLoop)) 468 mainLoop = ((SingleSuccessorOperator)mainLoop).Successor; 469 if (mainLoop == null) return null; 470 else return (OffspringSelectionGeneticAlgorithmMainLoop)mainLoop; 471 } 471 472 #endregion 472 473 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
r5356 r5366 215 215 } 216 216 private SASEGASAMainLoop MainLoop { 217 get { 218 return (SASEGASAMainLoop)( 219 (ResultsCollector)( 220 (UniformSubScopesProcessor)( 221 (VariableCreator)VillageProcessor.Successor 222 ).Successor 223 ).Successor 224 ).Successor; 225 } 217 get { return FindMainLoop(VillageProcessor.Successor); } 226 218 } 227 219 [Storable] … … 563 555 Analyzer.Operators.Add(selectionPressureAnalyzer); 564 556 } 557 private SASEGASAMainLoop FindMainLoop(IOperator start) { 558 IOperator mainLoop = start; 559 while (mainLoop != null && !(mainLoop is SASEGASAMainLoop)) 560 mainLoop = ((SingleSuccessorOperator)mainLoop).Successor; 561 if (mainLoop == null) return null; 562 else return (SASEGASAMainLoop)mainLoop; 563 } 565 564 #endregion 566 565 }
Note: See TracChangeset
for help on using the changeset viewer.