jenes.stage.operator
Class Mutator.Statistics

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

public class Mutator.Statistics
extends Operator.Statistics

A statistics object holding the number of mutation 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 mutator state or Operator.updateStatistics(jenes.stage.operator.Operator.Statistics) to modify an existing statistics according to the mutator state.

Esamples of use are showed below.

 Mutator.Statistics stat = a_mutator.getStatistics();
 

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

 Mutator.Statistics stat = new Mutator.Statistics();
 a_mutator.updateStatistics(stat);
 

modifies the existing statistics according to the specified mutator state.


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

mutations

protected long mutations
Number of mutations performed.

Constructor Detail

Mutator.Statistics

public Mutator.Statistics()
Method Detail

getMutations

public long getMutations()
Returns the number of mutations performed

Returns:
the number of mutations 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