libmoost
|
#include <histogram.hpp>
Classes | |
struct | data_info |
struct | range_info |
struct | stats |
Public Types | |
typedef FloatType | float_type |
Public Member Functions | |
histogram (const std::string &unit, size_t bins=120, size_t height=25) | |
void | set_display_range (float_type min, float_type max) |
void | set_precision (size_t prec) |
template<class InputIterator > | |
void | add (InputIterator first, InputIterator last, const std::string &id, const std::string &sym) |
float_type | mean () const |
void | draw (std::ostream &os, bool legend=true) const |
Private Member Functions | |
std::string | stats2str (const stats &st, const range_info &ri) const |
void | optimum_range (range_info &ri) const |
void | add_ticks (std::string &ticks, const range_info &ri, size_t desired_count, char tickmark, std::string *labels=0) const |
Static Private Member Functions | |
static void | get_stats (stats &s, const std::vector< data_info > &vdvec) |
static void | get_stats (stats &s, const std::vector< float_type > &vec) |
static float_type | invalid_value () |
static void | get_stats (stats &s, const std::vector< const std::vector< float_type > * > &vv) |
static float_type | nicenum (float_type x, bool round, float_type multiple_of=-1.0) |
static float_type | nice_bin_width (float_type x) |
Private Attributes | |
std::vector< data_info > | m_data |
size_t | m_count |
const std::string | m_unit |
const size_t | m_bins |
const size_t | m_height |
float_type | m_lo_cutoff |
float_type | m_hi_cutoff |
size_t | m_prec |
Definition at line 138 of file histogram.hpp.
typedef FloatType moost::utils::histogram< FloatType >::float_type |
Definition at line 141 of file histogram.hpp.
moost::utils::histogram< FloatType >::histogram | ( | const std::string & | unit, |
size_t | bins = 120 , |
||
size_t | height = 25 |
||
) | [inline] |
Definition at line 173 of file histogram.hpp.
void moost::utils::histogram< FloatType >::add | ( | InputIterator | first, |
InputIterator | last, | ||
const std::string & | id, | ||
const std::string & | sym | ||
) | [inline] |
void moost::utils::histogram< FloatType >::add_ticks | ( | std::string & | ticks, |
const range_info & | ri, | ||
size_t | desired_count, | ||
char | tickmark, | ||
std::string * | labels = 0 |
||
) | const [inline, private] |
Definition at line 465 of file histogram.hpp.
void moost::utils::histogram< FloatType >::draw | ( | std::ostream & | os, |
bool | legend = true |
||
) | const [inline] |
Definition at line 224 of file histogram.hpp.
static void moost::utils::histogram< FloatType >::get_stats | ( | stats & | s, |
const std::vector< data_info > & | vdvec | ||
) | [inline, static, private] |
static void moost::utils::histogram< FloatType >::get_stats | ( | stats & | s, |
const std::vector< float_type > & | vec | ||
) | [inline, static, private] |
static void moost::utils::histogram< FloatType >::get_stats | ( | stats & | s, |
const std::vector< const std::vector< float_type > * > & | vv | ||
) | [inline, static, private] |
static float_type moost::utils::histogram< FloatType >::invalid_value | ( | ) | [inline, static, private] |
float_type moost::utils::histogram< FloatType >::mean | ( | ) | const [inline] |
Definition at line 217 of file histogram.hpp.
static float_type moost::utils::histogram< FloatType >::nice_bin_width | ( | float_type | x | ) | [inline, static, private] |
static float_type moost::utils::histogram< FloatType >::nicenum | ( | float_type | x, |
bool | round, | ||
float_type | multiple_of = -1.0 |
||
) | [inline, static, private] |
void moost::utils::histogram< FloatType >::optimum_range | ( | range_info & | ri | ) | const [inline, private] |
Definition at line 415 of file histogram.hpp.
void moost::utils::histogram< FloatType >::set_display_range | ( | float_type | min, |
float_type | max | ||
) | [inline] |
void moost::utils::histogram< FloatType >::set_precision | ( | size_t | prec | ) | [inline] |
Definition at line 204 of file histogram.hpp.
std::string moost::utils::histogram< FloatType >::stats2str | ( | const stats & | st, |
const range_info & | ri | ||
) | const [inline, private] |
const size_t moost::utils::histogram< FloatType >::m_bins [private] |
Definition at line 586 of file histogram.hpp.
size_t moost::utils::histogram< FloatType >::m_count [private] |
Definition at line 584 of file histogram.hpp.
std::vector<data_info> moost::utils::histogram< FloatType >::m_data [private] |
Definition at line 583 of file histogram.hpp.
const size_t moost::utils::histogram< FloatType >::m_height [private] |
Definition at line 587 of file histogram.hpp.
float_type moost::utils::histogram< FloatType >::m_hi_cutoff [private] |
Definition at line 589 of file histogram.hpp.
float_type moost::utils::histogram< FloatType >::m_lo_cutoff [private] |
Definition at line 588 of file histogram.hpp.
size_t moost::utils::histogram< FloatType >::m_prec [private] |
Definition at line 590 of file histogram.hpp.
const std::string moost::utils::histogram< FloatType >::m_unit [private] |
Definition at line 585 of file histogram.hpp.