libmoost
moost::utils::histogram< FloatType > Class Template Reference

#include <histogram.hpp>

List of all members.

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_infom_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

Detailed Description

template<typename FloatType>
class moost::utils::histogram< FloatType >

Definition at line 138 of file histogram.hpp.


Member Typedef Documentation

template<typename FloatType>
typedef FloatType moost::utils::histogram< FloatType >::float_type

Definition at line 141 of file histogram.hpp.


Constructor & Destructor Documentation

template<typename FloatType>
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.


Member Function Documentation

template<typename FloatType>
template<class InputIterator >
void moost::utils::histogram< FloatType >::add ( InputIterator  first,
InputIterator  last,
const std::string &  id,
const std::string &  sym 
) [inline]

Definition at line 210 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
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.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename FloatType>
void moost::utils::histogram< FloatType >::draw ( std::ostream &  os,
bool  legend = true 
) const [inline]

Definition at line 224 of file histogram.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename FloatType>
static void moost::utils::histogram< FloatType >::get_stats ( stats s,
const std::vector< data_info > &  vdvec 
) [inline, static, private]

Definition at line 343 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
static void moost::utils::histogram< FloatType >::get_stats ( stats s,
const std::vector< float_type > &  vec 
) [inline, static, private]

Definition at line 353 of file histogram.hpp.

Here is the call graph for this function:

template<typename FloatType>
static void moost::utils::histogram< FloatType >::get_stats ( stats s,
const std::vector< const std::vector< float_type > * > &  vv 
) [inline, static, private]

Definition at line 367 of file histogram.hpp.

Here is the call graph for this function:

template<typename FloatType>
static float_type moost::utils::histogram< FloatType >::invalid_value ( ) [inline, static, private]

Definition at line 360 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
float_type moost::utils::histogram< FloatType >::mean ( ) const [inline]

Definition at line 217 of file histogram.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename FloatType>
static float_type moost::utils::histogram< FloatType >::nice_bin_width ( float_type  x) [inline, static, private]

Definition at line 563 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
static float_type moost::utils::histogram< FloatType >::nicenum ( float_type  x,
bool  round,
float_type  multiple_of = -1.0 
) [inline, static, private]

Definition at line 510 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
void moost::utils::histogram< FloatType >::optimum_range ( range_info ri) const [inline, private]

Definition at line 415 of file histogram.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename FloatType>
void moost::utils::histogram< FloatType >::set_display_range ( float_type  min,
float_type  max 
) [inline]

Definition at line 193 of file histogram.hpp.

Here is the caller graph for this function:

template<typename FloatType>
void moost::utils::histogram< FloatType >::set_precision ( size_t  prec) [inline]

Definition at line 204 of file histogram.hpp.

template<typename FloatType>
std::string moost::utils::histogram< FloatType >::stats2str ( const stats st,
const range_info ri 
) const [inline, private]

Definition at line 331 of file histogram.hpp.

Here is the caller graph for this function:


Member Data Documentation

template<typename FloatType>
const size_t moost::utils::histogram< FloatType >::m_bins [private]

Definition at line 586 of file histogram.hpp.

template<typename FloatType>
size_t moost::utils::histogram< FloatType >::m_count [private]

Definition at line 584 of file histogram.hpp.

template<typename FloatType>
std::vector<data_info> moost::utils::histogram< FloatType >::m_data [private]

Definition at line 583 of file histogram.hpp.

template<typename FloatType>
const size_t moost::utils::histogram< FloatType >::m_height [private]

Definition at line 587 of file histogram.hpp.

template<typename FloatType>
float_type moost::utils::histogram< FloatType >::m_hi_cutoff [private]

Definition at line 589 of file histogram.hpp.

template<typename FloatType>
float_type moost::utils::histogram< FloatType >::m_lo_cutoff [private]

Definition at line 588 of file histogram.hpp.

template<typename FloatType>
size_t moost::utils::histogram< FloatType >::m_prec [private]

Definition at line 590 of file histogram.hpp.

template<typename FloatType>
const std::string moost::utils::histogram< FloatType >::m_unit [private]

Definition at line 585 of file histogram.hpp.


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