|
hpp-statistics 9.0.2
Classes for doing statistics.
|
#include <hpp/statistics/distribution.hh>
Public Types | |
| typedef std::size_t | Weight_t |
| typedef std::pair< Weight_t, Value_t > | ProbaTPair |
| typedef std::vector< ProbaTPair >::iterator | iterator |
| typedef std::vector< ProbaTPair >::const_iterator | const_iterator |
Public Member Functions | |
| DiscreteDistribution ()=default | |
| Value_t | operator() () const |
| Value_t | operator() (const Proba_t &p) const |
| Value_t | operator() (const Weight_t &w) const |
| void | insert (Value_t v, Weight_t w=1) |
| Weight_t | get (const Value_t &v) const |
| size_t | size () const |
| Return the number of value. | |
| std::vector< Proba_t > | probabilities () const |
| Return the probabilities. | |
| std::vector< Value_t > | values () const |
| Return the values. | |
| Weight_t | totalWeight () const |
| Return the total weight. | |
Iterators | |
Iterate on the values. | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| typedef std::vector<ProbaTPair>::const_iterator hpp::statistics::DiscreteDistribution< Value_t >::const_iterator |
| typedef std::vector<ProbaTPair>::iterator hpp::statistics::DiscreteDistribution< Value_t >::iterator |
| typedef std::pair<Weight_t, Value_t> hpp::statistics::DiscreteDistribution< Value_t >::ProbaTPair |
| typedef std::size_t hpp::statistics::DiscreteDistribution< Value_t >::Weight_t |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the weight of a value Return 0 if value was not found.
|
inline |
Update the distribution. If v is already in the set, then update its weight. Otherwise, insert it.
|
inline |
|
inline |
|
inline |
|
inline |
Return the probabilities.
|
inline |
Return the number of value.
|
inline |
Return the total weight.
|
inline |
Return the values.