Changeset 15757 for branches/HeuristicLab.EvolutionTracking
- Timestamp:
- 02/12/18 16:12:51 (7 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs
r11925 r15757 77 77 // for performance, we use a hashset for lookup and a list for iteration 78 78 var nodes = new HashSet<IGenealogyGraphNode>(Parents); 79 var list = new List<IGenealogyGraphNode>( Parents);79 var list = new List<IGenealogyGraphNode>(nodes); 80 80 int i = 0; 81 81 while (i != list.Count) { 82 foreach (var e in list[i].InArcs) { 83 if (nodes.Contains(e.Source)) continue; 84 nodes.Add(e.Source); 85 list.Add(e.Source); 82 foreach (var arc in list[i].InArcs) { 83 if (nodes.Add(arc.Source)) 84 list.Add(arc.Source); 86 85 } 87 86 ++i; … … 94 93 get { 95 94 var nodes = new HashSet<IGenealogyGraphNode>(Children); 96 var list = new List<IGenealogyGraphNode>( Children);95 var list = new List<IGenealogyGraphNode>(nodes); 97 96 int i = 0; 98 97 while (i != list.Count) { 99 98 foreach (var e in list[i].OutArcs) { 100 if (nodes.Contains(e.Target)) continue; 101 nodes.Add(e.Target); 102 list.Add(e.Target); 99 if (nodes.Add(e.Target)) 100 list.Add(e.Target); 103 101 } 104 102 ++i; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj
r12163 r15757 130 130 <Compile Include="Operators\Interfaces\IManipulatorOperator.cs" /> 131 131 <Compile Include="Operators\Interfaces\ICrossoverOperator.cs" /> 132 <Compile Include="Operators\RemovePopulationGraphFromResults.cs" /> 132 133 <Compile Include="Plugin.cs"> 133 134 <SubType>Code</SubType>
Note: See TracChangeset
for help on using the changeset viewer.