jenes.stage.operator
Class Mutator.Statistics
java.lang.Object
jenes.stage.operator.Operator.Statistics
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. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mutations
protected long mutations
- Number of mutations performed.
Mutator.Statistics
public Mutator.Statistics()
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