devolve



class  StatCollector(T, alias comp = "a > b");

Class to hold statistics about each generation during an evolution. An instance of this type is passed to the selector, which should call 'addGeneration' with a sorted range of individuals and doubles representing the fitness of each individual.


alias  individualFit = Tuple!(double, "fitness", T, "individual");

Convienience alias


struct  Statistics;

Object holding statistics for a single generation


double  meanFit;

Mean fitness


Standard deviation


individualFit  best;

Individual with  best fitness and the fitness


individualFit  worst;

Individual with  worst fitness and the fitness


uint  deltaTime;

Time between generations added to the statCollection in microseconds


const string  toString();

Convert the statistics to a string


const const(Statistics)  last();

Get the most recent generation statistics


const const(Statistics)  first();

Get statistics for the  first generation


const const(individualFit)  historicalBest();

Get the best recorded individual


void  registerGeneration(popFitRange)(popFitRange range) if (isForwardRange!popFitRange && is(typeof(range[0][0]) == double) && is(typeof(range[0][1]) == T));

Add the generation to the statistical history. 'popFitRange' must be in sorted order.


const void  writeCSV(string name = "data.csv");

Write data out as CSV file