public abstract class EvolutionStatistics<C extends Comparable<? super C>,FitnessStatistics> extends Object implements Consumer<EvolutionResult<?,C>>
 final Engine<DoubleGene, Double> engine = ...
 final EvolutionStatistics<Double, DoubleMomentStatistics> statistics =
     EvolutionStatistics.ofNumber();
 final Phenotype<DoubleGene, Double> result = engine.stream()
     .limit(bySteadyFitness(7))
     .limit(100)
     .peek(statistics)
     .collect(toBestPhenotype());
 System.println(statistics);
 +---------------------------------------------------------------------------+
 |  Time statistics                                                          |
 +---------------------------------------------------------------------------+
 |             Selection: sum=0.046538278000 s; mean=0.003878189833 s        |
 |              Altering: sum=0.086155457000 s; mean=0.007179621417 s        |
 |   Fitness calculation: sum=0.022901606000 s; mean=0.001908467167 s        |
 |     Overall execution: sum=0.147298067000 s; mean=0.012274838917 s        |
 +---------------------------------------------------------------------------+
 |  Evolution statistics                                                     |
 +---------------------------------------------------------------------------+
 |           Generations: 12                                                 |
 |               Altered: sum=7,331; mean=610.916666667                      |
 |                Killed: sum=0; mean=0.000000000                            |
 |              Invalids: sum=0; mean=0.000000000                            |
 +---------------------------------------------------------------------------+
 |  Population statistics                                                    |
 +---------------------------------------------------------------------------+
 |                   Age: max=11; mean=1.951000; var=5.545190                |
 |               Fitness:                                                    |
 |                      min  = 0.000000000000                                |
 |                      max  = 481.748227114537                              |
 |                      mean = 384.430345078660                              |
 |                      var  = 13006.132537301528                            |
 +---------------------------------------------------------------------------+| Modifier and Type | Method and Description | 
|---|---|
| void | accept(EvolutionResult<?,C> result) | 
| DoubleMomentStatistics | getAlterDuration()Return the duration statistics needed for altering the population, in
 seconds. | 
| IntMomentStatistics | getAltered()Return the statistics about the altered individuals during the evolution
 process. | 
| DoubleMomentStatistics | getEvaluationDuration()Return the duration statistics needed for evaluating the fitness function
 of the new individuals, in seconds. | 
| DoubleMomentStatistics | getEvolveDuration()Return the duration statistics needed for the whole evolve step, in
 seconds. | 
| FitnessStatistics | getFitness()Return the minimal and maximal fitness. | 
| IntMomentStatistics | getInvalids()Return the statistics about the invalid individuals during the evolution
 process. | 
| IntMomentStatistics | getKilled()Return the statistics about the killed individuals during the evolution
 process. | 
| LongMomentStatistics | getPhenotypeAge()Return the statistics about the individuals age. | 
| DoubleMomentStatistics | getSelectionDuration()Return the duration statistics needed for selecting the population, in
 seconds. | 
| static <C extends Comparable<? super C>> | ofComparable() | 
| static <N extends Number & Comparable<? super N>> | ofNumber() | 
| String | toString() | 
public void accept(EvolutionResult<?,C> result)
accept in interface Consumer<EvolutionResult<?,C extends Comparable<? super C>>>public DoubleMomentStatistics getSelectionDuration()
public DoubleMomentStatistics getAlterDuration()
public DoubleMomentStatistics getEvaluationDuration()
public DoubleMomentStatistics getEvolveDuration()
public IntMomentStatistics getKilled()
public IntMomentStatistics getInvalids()
public IntMomentStatistics getAltered()
public LongMomentStatistics getPhenotypeAge()
public FitnessStatistics getFitness()
public static <C extends Comparable<? super C>> EvolutionStatistics<C,MinMax<C>> ofComparable()
public static <N extends Number & Comparable<? super N>> EvolutionStatistics<N,DoubleMomentStatistics> ofNumber()
© 2007-2014 Franz Wilhelmstötter (2014-12-28 10:45)