Skip to content

Commit

Permalink
#645: Deprecate getter for EvolutionStatistics.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenetics committed Jan 23, 2020
1 parent 1a0e139 commit f3446ca
Showing 1 changed file with 108 additions and 2 deletions.
110 changes: 108 additions & 2 deletions jenetics/src/main/java/io/jenetics/engine/EvolutionStatistics.java
Expand Up @@ -85,7 +85,7 @@
*
* @author <a href="mailto:franz.wilhelmstoetter@gmail.com">Franz Wilhelmstötter</a>
* @since 3.0
* @version 3.0
* @version !__version__!
*/
public abstract class EvolutionStatistics<
C extends Comparable<? super C>,
Expand Down Expand Up @@ -163,6 +163,18 @@ private static double toSeconds(final Duration duration) {
*
* @return the duration statistics needed for selecting the population
*/
public DoubleMomentStatistics selectionDuration() {
return _selectionDuration;
}

/**
* Return the duration statistics needed for selecting the population, in
* seconds.
*
* @return the duration statistics needed for selecting the population
* @deprecated Use {@link #selectionDuration()} instead
*/
@Deprecated
public DoubleMomentStatistics getSelectionDuration() {
return _selectionDuration;
}
Expand All @@ -173,6 +185,18 @@ public DoubleMomentStatistics getSelectionDuration() {
*
* @return the duration statistics needed for altering the population
*/
public DoubleMomentStatistics alterDuration() {
return _alterDuration;
}

/**
* Return the duration statistics needed for altering the population, in
* seconds.
*
* @return the duration statistics needed for altering the population
* @deprecated Use {@link #alterDuration()} instead
*/
@Deprecated
public DoubleMomentStatistics getAlterDuration() {
return _alterDuration;
}
Expand All @@ -184,6 +208,19 @@ public DoubleMomentStatistics getAlterDuration() {
* @return the duration statistics needed for evaluating the fitness
* function of the new individuals
*/
public DoubleMomentStatistics evaluationDuration() {
return _evaluationDuration;
}

/**
* Return the duration statistics needed for evaluating the fitness function
* of the new individuals, in seconds.
*
* @return the duration statistics needed for evaluating the fitness
* function of the new individuals
* @deprecated Use {@link #evaluationDuration()} instead
*/
@Deprecated
public DoubleMomentStatistics getEvaluationDuration() {
return _evaluationDuration;
}
Expand All @@ -194,10 +231,21 @@ public DoubleMomentStatistics getEvaluationDuration() {
*
* @return the duration statistics needed for the whole evolve step
*/
public DoubleMomentStatistics getEvolveDuration() {
public DoubleMomentStatistics evolveDuration() {
return _evolveDuration;
}

/**
* Return the duration statistics needed for the whole evolve step, in
* seconds.
*
* @return the duration statistics needed for the whole evolve step
* @deprecated Use {@link #evaluationDuration()} instead
*/
@Deprecated
public DoubleMomentStatistics getEvolveDuration() {
return _evolveDuration;
}


/* *************************************************************************
Expand All @@ -210,6 +258,18 @@ public DoubleMomentStatistics getEvolveDuration() {
*
* @return killed individual statistics
*/
public IntMomentStatistics killed() {
return _killed;
}

/**
* Return the statistics about the killed individuals during the evolution
* process.
*
* @return killed individual statistics
* @deprecated Use {@link #killed()} instead
*/
@Deprecated
public IntMomentStatistics getKilled() {
return _killed;
}
Expand All @@ -220,6 +280,18 @@ public IntMomentStatistics getKilled() {
*
* @return invalid individual statistics
*/
public IntMomentStatistics invalids() {
return _invalids;
}

/**
* Return the statistics about the invalid individuals during the evolution
* process.
*
* @return invalid individual statistics
* @deprecated Use {@link #invalids()} instead
*/
@Deprecated
public IntMomentStatistics getInvalids() {
return _invalids;
}
Expand All @@ -230,6 +302,18 @@ public IntMomentStatistics getInvalids() {
*
* @return altered individual statistics
*/
public IntMomentStatistics altered() {
return _altered;
}

/**
* Return the statistics about the altered individuals during the evolution
* process.
*
* @return altered individual statistics
* @deprecated Use {@link #altered()} instead
*/
@Deprecated
public IntMomentStatistics getAltered() {
return _altered;
}
Expand All @@ -239,6 +323,17 @@ public IntMomentStatistics getAltered() {
*
* @return individual age statistics
*/
public LongMomentStatistics phenotypeAge() {
return _age;
}

/**
* Return the statistics about the individuals age.
*
* @return individual age statistics
* @deprecated Use {@link #phenotypeAge()} instead
*/
@Deprecated
public LongMomentStatistics getPhenotypeAge() {
return _age;
}
Expand All @@ -248,6 +343,17 @@ public LongMomentStatistics getPhenotypeAge() {
*
* @return minimal and maximal fitness
*/
public FitnessStatistics fitness() {
return _fitness;
}

/**
* Return the minimal and maximal fitness.
*
* @return minimal and maximal fitness
* @deprecated Use {@link #fitness()} instead
*/
@Deprecated
public FitnessStatistics getFitness() {
return _fitness;
}
Expand Down

0 comments on commit f3446ca

Please sign in to comment.