jenes.stage.operator
Class Selector.Statistics

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

public class Selector.Statistics
extends Operator.Statistics

A statistics object holding the number of selection 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 selector state.

Esamples of use are showed below.

 Selector.Statistics stat = a_selector.getStatistics();
 

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

 Selector.Statistics stat = new Selector.Statistics();
 a_selector.updateStatistics(stat);
 

modifies the existing statistics according to the specified selector state.


Field Summary
protected  long selections
          Number of selections performed.
 
Fields inherited from class jenes.stage.operator.Operator.Statistics
executionTime
 
Constructor Summary
Selector.Statistics()
           
 
Method Summary
protected  void fill(Operator.Statistics stats)
          Fills the specified statistics with the data of the operator statistics.
 long getSelections()
          Returns the number of selections 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

selections

protected long selections
Number of selections performed.

Constructor Detail

Selector.Statistics

public Selector.Statistics()
Method Detail

getSelections

public long getSelections()
Returns the number of selections performed.

Returns:
the number of selections performed.

fill

protected 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