jenes.stage.operator
Class Crossover.Statistics

java.lang.Object
  extended by jenes.stage.operator.Operator.Statistics
      extended by jenes.stage.operator.Crossover.Statistics
Enclosing class:
Crossover<T extends Chromosome>

public final class Crossover.Statistics
extends Operator.Statistics

A statistics object holding the number of crossover performed and the time spent to execute them. The statistics is available by two methods: Operator.getStatistics() to have a new statistics setted according to the crossover state or Operator.updateStatistics(jenes.stage.operator.Operator.Statistics) to modify an existing statistics according to the crossover state.

Esamples of use are showed below.

 Crossover.Statistics stat = a_crossover.getStatistics();
 

returns a new statistics object setted according to the specified crossover state.

 Crossover.Statistics stat = new Crossover.Statistics();
 a_crossover.updateStatistics(stat);
 

modifies the existing statistics according to the specified crossover state.


Field Summary
protected  long crossovers
          Number of crossovers performed.
 
Fields inherited from class jenes.stage.operator.Operator.Statistics
executionTime
 
Constructor Summary
Crossover.Statistics()
           
 
Method Summary
protected  void fill(Operator.Statistics stats)
          Fills the specified statistics with the data of the operator statistics.
 long getCrossovers()
          Returns the number of crossovers performed.
 
Methods inherited from class jenes.stage.operator.Operator.Statistics
getExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crossovers

protected long crossovers
Number of crossovers performed.

Constructor Detail

Crossover.Statistics

public Crossover.Statistics()
Method Detail

getCrossovers

public final long getCrossovers()
Returns the number of crossovers performed.

Returns:
the number of crossovers performed.

fill

protected final void fill(Operator.Statistics stats)
Description copied from class: Operator.Statistics
Fills the specified statistics with the data of the operator statistics. At the end, these statistics will have the same state

Overrides:
fill in class Operator.Statistics
Parameters:
stats - the statistics to fill