ECF 1.5
|
Statistics calculation class. More...
#include <StatCalc.h>
Public Member Functions | |
bool | operate (StateP) |
perform the designated operation More... | |
bool | operate (const std::vector< IndividualP > &) |
Calculate basic fitness statistics on given individual pool. Add new statistic for each measure (min, max, avg, dev, time, size, low, high) More... | |
void | registerParameters (StateP) |
Register parameters with the Registry. Called before Operator::initialize. More... | |
bool | initialize (StateP) |
Perform initialization. Called before Operator::operate. By default, if the return value is false, the operator will not be used! More... | |
bool | update (std::vector< double >) |
void | log (int generation=-1) |
std::vector< double > | getStats (int generation=-1) |
void | output (uint step) |
void | copyStats (StatCalcP) |
double | getFitnessMin (int generation=-1) |
double | getFitnessMax (int generation=-1) |
uint | increaseEvaluations (uint eval=1) |
void | setEvaluations (uint eval) |
uint | getEvaluations () |
double | getLowestFitness () |
double | getHighestFitness () |
Public Member Functions inherited from Operator | |
virtual bool | operate (StateP)=0 |
perform the designated operation More... | |
virtual bool | initialize (StateP) |
Perform initialization. Called before Operator::operate. By default, if the return value is false, the operator will not be used! More... | |
virtual void | registerParameters (StateP) |
Register parameters with the Registry. Called before Operator::initialize. More... | |
virtual void | write (XMLNode &) |
Write operator state to XMLNode or the Registry. Called after Operator::initialize. More... | |
virtual void | read (XMLNode &) |
Read operator state from XMLNode or the Registry. Called after Operator::initialize. More... | |
Statistics calculation class.
Definition at line 19 of file StatCalc.h.
StatCalc::StatCalc | ( | ) |
Definition at line 6 of file StatCalc.cpp.
void StatCalc::copyStats | ( | StatCalcP | stats | ) |
Copy latest statistics from another Stat object.
Definition at line 132 of file StatCalc.cpp.
|
inline |
get total number of fitness evaluations
Definition at line 73 of file StatCalc.h.
double StatCalc::getFitnessMax | ( | int | generation = -1 | ) |
Get maximum fitness value for a given generation.
Definition at line 59 of file StatCalc.cpp.
double StatCalc::getFitnessMin | ( | int | generation = -1 | ) |
Get minimum fitness value for a given generation.
Definition at line 48 of file StatCalc.cpp.
|
inline |
get highest ever fitness vale
Definition at line 85 of file StatCalc.h.
|
inline |
get lowest ever fitness vale
Definition at line 79 of file StatCalc.h.
std::vector< double > StatCalc::getStats | ( | int | gen = -1 | ) |
Get statistic values for a given generation.
Definition at line 205 of file StatCalc.cpp.
|
inline |
increase and return total number of fitness evaluations
Definition at line 58 of file StatCalc.h.
|
virtual |
Perform initialization. Called before Operator::operate. By default, if the return value is false, the operator will not be used!
Reimplemented from Operator.
Definition at line 19 of file StatCalc.cpp.
void StatCalc::log | ( | int | generation = -1 | ) |
Log statistics.
Definition at line 228 of file StatCalc.cpp.
bool StatCalc::operate | ( | const std::vector< IndividualP > & | pool | ) |
Calculate basic fitness statistics on given individual pool. Add new statistic for each measure (min, max, avg, dev, time, size, low, high)
Definition at line 71 of file StatCalc.cpp.
|
inlinevirtual |
void StatCalc::output | ( | uint | step | ) |
Definition at line 240 of file StatCalc.cpp.
|
virtual |
Register parameters with the Registry. Called before Operator::initialize.
Reimplemented from Operator.
Definition at line 13 of file StatCalc.cpp.
|
inline |
set total number of fitness evaluations
Definition at line 67 of file StatCalc.h.
bool StatCalc::update | ( | std::vector< double > | stats | ) |
Merge current statistics with additional individual set's statistics.
Definition at line 153 of file StatCalc.cpp.