Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/18 16:12:51 (7 years ago)
Author:
bburlacu
Message:

#1772: Add operator for removing the population graph from the results at the end of the run (useful for hive experiments)

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  
    7777        // for performance, we use a hashset for lookup and a list for iteration
    7878        var nodes = new HashSet<IGenealogyGraphNode>(Parents);
    79         var list = new List<IGenealogyGraphNode>(Parents);
     79        var list = new List<IGenealogyGraphNode>(nodes);
    8080        int i = 0;
    8181        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);
    8685          }
    8786          ++i;
     
    9493      get {
    9594        var nodes = new HashSet<IGenealogyGraphNode>(Children);
    96         var list = new List<IGenealogyGraphNode>(Children);
     95        var list = new List<IGenealogyGraphNode>(nodes);
    9796        int i = 0;
    9897        while (i != list.Count) {
    9998          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);
    103101          }
    104102          ++i;
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj

    r12163 r15757  
    130130    <Compile Include="Operators\Interfaces\IManipulatorOperator.cs" />
    131131    <Compile Include="Operators\Interfaces\ICrossoverOperator.cs" />
     132    <Compile Include="Operators\RemovePopulationGraphFromResults.cs" />
    132133    <Compile Include="Plugin.cs">
    133134      <SubType>Code</SubType>
Note: See TracChangeset for help on using the changeset viewer.