public static final class Population.Statistics<T extends Chromosome> extends StatisticsLogger.LoggableStatistics
Population.Statistics
class is only responsible for storing statistics
about a population. As each population can contains legal and illegal individials, it holds
the individuals with the higher and lower fitness (a deep-cloning is maked to store these individuals so they don't
change if the source population does),
the average and deviation values both regard legal individuals and illegal ones.
Esamples of use are showed below.
Population.Statistics stat = a_population.getStatistics();
returns a new statistics object setted according to the specified population state.
Population.Statistics stat = new Population.Statistics(); a_population.updateStatistics(stat);
modifies the existing statistics according to the specified population state.
Modifier and Type | Class and Description |
---|---|
static class |
Population.Statistics.Group<T extends Chromosome>
Represents a group of individuals and related statistics.
|
Modifier | Constructor and Description |
---|---|
protected |
Population.Statistics(boolean[] bis)
Constructs a new Population.Statitics
|
Modifier and Type | Method and Description |
---|---|
Population.Statistics.Group<T> |
addGroup(Population.Filter filter,
boolean collectable)
Add a new
Population.Statistics.Group of individuals definition to the population
accessible in statistics |
java.util.Collection<Population.Statistics.Group<T>> |
getAllGroups()
Returns a collection of all
Population.Statistics.Group |
boolean[] |
getBiggerIsBetter()
Returns a array that contains a flag for each objective.
|
Population.Statistics.Group<T> |
getGroup(Population.Filter filter)
Returns a
Population.Statistics.Group for a specific Population.Filter given as argument |
Individual<T> |
getIllegalHighestIndividual()
Deprecated.
|
double |
getIllegalHighestScore()
Deprecated.
|
Individual<T> |
getIllegalLowestIndividual()
Deprecated.
|
double |
getIllegalLowestScore()
Deprecated.
|
double |
getIllegalScoreAvg()
Deprecated.
|
double |
getIllegalScoreDev()
Deprecated.
|
Individual<T> |
getLegalHighestIndividual()
Deprecated.
|
double |
getLegalHighestScore()
Deprecated.
|
Individual<T> |
getLegalLowestIndividual()
Deprecated.
|
double |
getLegalLowestScore()
Deprecated.
|
double |
getLegalScoreAvg()
Deprecated.
|
double |
getLegalScoreDev()
Deprecated.
|
int |
getNumOfIllegalIndividuals()
Deprecated.
|
int |
getNumOfIndividuals()
Deprecated.
|
int |
getNumOfLegalIndividuals()
Deprecated.
|
int |
getNumOfObjectives()
Returns the number of objective.
|
void |
update(Population<T> population)
Updates all its information about population
|
getFigures, getValue
protected Population.Statistics(boolean[] bis)
bis
- array of flags. Each flag indicates if maximize or minimize the score
for an objective in a specific position.public final void update(Population<T> population)
population
- public boolean[] getBiggerIsBetter()
public int getNumOfObjectives()
public Population.Statistics.Group<T> addGroup(Population.Filter filter, boolean collectable)
Population.Statistics.Group
of individuals definition to the population
accessible in statisticsfilter
- the filter to apply in generating a Group of solutionscollectable
- true if the group have to preserve the
individuals that generate statistics; false if only numerical
statistics are required; in this case, the Population.Statistics.Group.iterator()
will return null individuals and {@link Group#getCardinality()]
will return ever 1.Population.Statistics.Group
generated applying the filter given as argumentpublic Population.Statistics.Group<T> getGroup(Population.Filter filter)
Population.Statistics.Group
for a specific Population.Filter
given as argumentfilter
- to select a specific grouppublic java.util.Collection<Population.Statistics.Group<T>> getAllGroups()
Population.Statistics.Group
@Deprecated public final double getLegalScoreAvg()
@Deprecated public final double getLegalScoreDev()
@Deprecated public final double getLegalHighestScore()
@Deprecated public final Individual<T> getLegalHighestIndividual()
@Deprecated public final double getLegalLowestScore()
@Deprecated public final Individual<T> getLegalLowestIndividual()
@Deprecated public final double getIllegalScoreAvg()
@Deprecated public final double getIllegalScoreDev()
@Deprecated public final double getIllegalHighestScore()
@Deprecated public final Individual<T> getIllegalHighestIndividual()
@Deprecated public final double getIllegalLowestScore()
@Deprecated public final Individual<T> getIllegalLowestIndividual()
@Deprecated public final int getNumOfIndividuals()
@Deprecated public final int getNumOfLegalIndividuals()
@Deprecated public final int getNumOfIllegalIndividuals()