Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11769


Ignore:
Timestamp:
01/15/15 17:25:52 (9 years ago)
Author:
bburlacu
Message:

#1772: Changed the GenealogyAnalyzer according to the changes in IGenealogyGraph.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs

    r11639 r11769  
    278278        #endregion
    279279
    280         ComputeSuccessRatios(genealogyGraph);
     280        //        ComputeSuccessRatios(genealogyGraph);
    281281      }
    282282      // update qualities
     
    288288      // remove extra graph nodes (added by the instrumented operators in the case of offspring selection)
    289289      var pop = new HashSet<T>(population);
    290       var discarded = genealogyGraph.Ranks[generation].Where(x => !pop.Contains(x.Data)).ToList();
     290      var discarded = genealogyGraph.GetByRank(generation).Where(x => !pop.Contains(x.Data)).ToList();
    291291      for (int i = 0; i < discarded.Count; ++i) {
    292292        var v = discarded[i];
     
    344344        VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.Columns, StartIndexZero = true }
    345345      };
    346       successfulOffspringRatioRow.Values.Replace(genealogyGraph.Ranks[generation - 1].OrderByDescending(x => x.Quality).Select(x => x.OutDegree > 0 ? x.Weight / x.OutDegree : 0));
     346      successfulOffspringRatioRow.Values.Replace(genealogyGraph.GetByRank(generation).OrderByDescending(x => x.Quality).Select(x => x.OutDegree > 0 ? x.Weight / x.OutDegree : 0));
    347347      successfulOffspringRatioTable.Rows.Add(successfulOffspringRatioRow);
    348348      successfulOffspringRatioHistory.Add(successfulOffspringRatioTable);
     
    367367        VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.Columns, StartIndexZero = true }
    368368      };
    369       successfulOffspringValuesRow.Values.Replace(genealogyGraph.Ranks[generation - 1].OrderByDescending(x => x.Quality).Select(x => x.Weight));
     369      successfulOffspringValuesRow.Values.Replace(genealogyGraph.GetByRank(generation).OrderByDescending(x => x.Quality).Select(x => x.Weight));
    370370      successfulOffspringValuesTable.Rows.Add(successfulOffspringValuesRow);
    371371      successfulOffspringAbsoluteHistory.Add(successfulOffspringValuesTable);
Note: See TracChangeset for help on using the changeset viewer.