Basic distribution template. More...
#include <distribution.h>
Public Member Functions | |
distribution_t (void) throw () | |
void | clear (void) throw () |
void | addSample (IN T x) |
long | size (void) const throw () |
T | getValueAtPercentile (IN float p) const throw () |
note that 0 < p < 1 | |
T | getValueAtIndex (IN int idx) const throw () |
given a sample index, return its value. | |
float | getPercentileAtValue (IN T x) const throw () |
Basic distribution template.
You can add samples, then query to find percentiles etc.
Definition at line 42 of file distribution.h.
distribution_t< T >::distribution_t | ( | void | ) | throw () [inline] |
Definition at line 44 of file distribution.h.
void distribution_t< T >::clear | ( | void | ) | throw () [inline] |
Definition at line 46 of file distribution.h.
void distribution_t< T >::addSample | ( | IN T | x | ) | [inline] |
Definition at line 51 of file distribution.h.
long distribution_t< T >::size | ( | void | ) | const throw () [inline] |
Definition at line 62 of file distribution.h.
T distribution_t< T >::getValueAtPercentile | ( | IN float | p | ) | const throw () [inline] |
note that 0 < p < 1
Definition at line 65 of file distribution.h.
T distribution_t< T >::getValueAtIndex | ( | IN int | idx | ) | const throw () [inline] |
given a sample index, return its value.
Samples are ordered by size, so the smallest will have idx = 0.
Definition at line 85 of file distribution.h.
float distribution_t< T >::getPercentileAtValue | ( | IN T | x | ) | const throw () [inline] |
Definition at line 102 of file distribution.h.