stat#

Namespaces#

Classes#

Histogram#

class Histogram : public ioh::logger::eah::Stat<std::vector<std::vector<size_t>>>#

Computes the matrix that is the sum of all matrices in an AttainmentSuite.

Across problems, dimensions and instances.

using namespcae ioh::logger;
eah::stat::Histogram h;
eah::stat::Histogram::Mat a = h(logger);
size_t n = h.nb_attainments();

Note

This functor holds the number of attainment matrix it hase encountered during its computation. If you just need the histogram, see the stat::histogram function.

Public Types

using Mat = std::vector<std::vector<size_t>>#

The type used to store the histogram matrix.

Note

Dimensions follow the AttainmentMatrix convention, with errors as first dimension, and evaluations as second dimension.

Public Functions

inline Histogram()#

Constructor.

inline virtual Mat operator()(const EAH &logger) override#

Computes the histogram on the logger’s data.

Parameters:

logger – The logger::EAH.

Returns:

a (<nb of targets buckets> * <nb of evaluations buckets>) matrix of positive integers.

inline size_t nb_attainments() const#

Returns the number of attainment matrices encountered during main computations.

Note

Will not fail if several computations are called and you inadvertantly called it on the previous one.

Warning

Will fail on a Debug assert if operator() has not been called at least once before.

Protected Attributes

bool _has_computed#

State check flag.

size_t _nb_att#

Number of encountered attainment matrices.

Functions#

accumulate#

template<class T, class BinaryOperation>
T ioh::logger::eah::stat::accumulate(const EAH &logger, const T init, const BinaryOperation &op)#

Generic functor for accumulated statistics.

Most probably called from a function defaulting the basic operation, like stat::sum, or used in a function which compute something else.

distribution#

inline std::vector<std::vector<double>> ioh::logger::eah::stat::distribution(const EAH &logger)#

Computes the matrix that is joint empirical cumulative distribution function of all attainments in a logger.

Across problems, dimensions and instances.

That is, a (<nb of targets buckets> * <nb of evaluations buckets>) matrix of probabilities.

This is actually the Histogram / nb_attaiments.

Note

You can get the return type from Distribution::Mat (normally a simple vector<vector<double>>).

using namespace ioh::logger;
eah::stat::Distribution::Mat m = eah::stat::distribution(logger);

histogram#

inline Histogram::Mat ioh::logger::eah::stat::histogram(const EAH &logger)#

Computes the matrix that is the sum of all matrices in an AttainmentSuite.

Across problems, dimensions and instances.

That is, a (<nb of targets buckets> * <nb of evaluations buckets>) matrix of positive integers.

Useful if you want to display the related histogram, for instance.

Note

You can get the return type from Histogram::Mat (normally a simple vector<vector<size_t>>).

using namespace ioh::logger;
eah::stat::Histogram::Mat m = eah::stat::histogram(logger);

sum#

inline size_t ioh::logger::eah::stat::sum(const EAH &logger)#

Computes the sum of all elements of an AttainmentSuite data structure.

using namespace ioh::logger;
size_t s = eah::stat::sum(logger);