This class stores current information about the particle swarm. More...
#include <statistics.h>
Public Member Functions | |
Statistics (std::vector< Particle * > *initial_swarm) | |
The constructor. More... | |
void | EvaluateStatistics () |
If the current iteration counter has a value, where statistical calculations are expected, then the values of all statistics are evaluated and stored in respective vectors. More... | |
void | LoadData (std::ifstream *input_stream, ProgramVersion *version_of_stored_data) |
Loads data to reset the state of the statistics object to the state which was stored. More... | |
void | StoreData (std::ofstream *output_stream) |
Stores the current state of the statistics object (iteration counter, attractor positions and update counter) such that it can completely restore the current state with this data. More... | |
Public Attributes | |
long long | current_iteration |
The current iteration counter. More... | |
std::vector< long long > | global_attractor_update_counter |
For each particle the number of global attractor updates enforced by found positions of this particle. More... | |
std::vector< long long > | local_attractor_update_counter |
For each particle the number of local attractor updates enforced by found positions of this particle. More... | |
std::vector< std::vector< std::string > > | stored_statistical_data |
Various lists of stored (but not yet saved) statistical data. More... | |
std::vector< long long > | stored_statistical_iterations |
The iteration numbers of stored (but not yet saved) statistical data. More... | |
std::vector< Particle * > * | swarm |
The list of particles, which are contained in the current swarm. More... | |
Detailed Description
This class stores current information about the particle swarm.
Constructor & Destructor Documentation
highprecisionpso::Statistics::Statistics | ( | std::vector< Particle * > * | initial_swarm | ) |
The constructor.
- Parameters
-
initial_swarm The list of particles, which are contained in the current swarm.
Member Function Documentation
void highprecisionpso::Statistics::EvaluateStatistics | ( | ) |
If the current iteration counter has a value, where statistical calculations are expected, then the values of all statistics are evaluated and stored in respective vectors.
void highprecisionpso::Statistics::LoadData | ( | std::ifstream * | input_stream, |
ProgramVersion * | version_of_stored_data | ||
) |
Loads data to reset the state of the statistics object to the state which was stored.
- Parameters
-
input_stream The stream which contains the data about the statistics (iteration counter, attractor positions and update counter). version_of_stored_data The version of the program when the backup was created.
void highprecisionpso::Statistics::StoreData | ( | std::ofstream * | output_stream | ) |
Stores the current state of the statistics object (iteration counter, attractor positions and update counter) such that it can completely restore the current state with this data.
- Parameters
-
output_stream The output stream where the state should be stored.
Member Data Documentation
long long highprecisionpso::Statistics::current_iteration |
The current iteration counter.
std::vector<long long> highprecisionpso::Statistics::global_attractor_update_counter |
For each particle the number of global attractor updates enforced by found positions of this particle.
std::vector<long long> highprecisionpso::Statistics::local_attractor_update_counter |
For each particle the number of local attractor updates enforced by found positions of this particle.
std::vector<std::vector<std::string> > highprecisionpso::Statistics::stored_statistical_data |
Various lists of stored (but not yet saved) statistical data.
std::vector<long long> highprecisionpso::Statistics::stored_statistical_iterations |
The iteration numbers of stored (but not yet saved) statistical data.
std::vector<Particle*>* highprecisionpso::Statistics::swarm |
The list of particles, which are contained in the current swarm.
The documentation for this class was generated from the following file:
- src/statistics/statistics.h