Evoplex  0.2.1
Static Public Member Functions | List of all members
evoplex::Stats Class Reference

The Stats class. More...

#include <stats.h>

Static Public Member Functions

template<typename ConstIterator >
static std::vector< Valuecount (ConstIterator entityBegin, ConstIterator entityEnd, const int attrIdx, std::vector< Value > header)
 Count frequency of the header values in the container. More...
 
template<typename Container >
static std::vector< Valuecount (Container entity, const int attrIdx, std::vector< Value > values)
 Count frequency of the header values in the container. More...
 

Detailed Description

The Stats class.

Member Function Documentation

◆ count() [1/2]

template<typename ConstIterator >
static std::vector<Value> evoplex::Stats::count ( ConstIterator  entityBegin,
ConstIterator  entityEnd,
const int  attrIdx,
std::vector< Value header 
)
inlinestatic

Count frequency of the header values in the container.

Example:

  • if header is ['a', 'c'], it'll count how many a's and c's exist in the container
  • if there are 100 a's and 123 c's, it'll return [100, 123]
  • if there are no a's and c's, it'll return [0, 0]

◆ count() [2/2]

template<typename Container >
static std::vector<Value> evoplex::Stats::count ( Container  entity,
const int  attrIdx,
std::vector< Value values 
)
inlinestatic

Count frequency of the header values in the container.

Example:

  • if header is ['a', 'c'], it'll count how many a's and c's exist in the container
  • if there are 100 a's and 123 c's, it'll return [100, 123]
  • if there are no a's and c's, it'll return [0, 0]

The documentation for this class was generated from the following file: