Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Member Functions | Friends | List of all members
mygsl::histogram Class Reference

One dimensional histogram. More...

#include <bayeux/mygsl/histogram.h>

Inheritance diagram for mygsl::histogram:
datatools::i_serializable datatools::i_tree_dumpable

Classes

class  pdf
 PDF associated to a one dimensional histogram. More...
 

Public Member Functions

const datatools::propertiesget_auxiliaries () const
 
datatools::propertiesgrab_auxiliaries ()
 
double get_binning_info () const
 
bool is_uniform_binning () const
 
bool is_logarithmic_binning () const
 
bool is_any_binning () const
 
double get_uniform_binning () const
 
double get_logarithmic_binning () const
 
bool is_initialized () const
 
void initialize (size_t n_, double min_, double max_, unsigned int mode_=BIN_MODE_LINEAR)
 
void init (const std::vector< double > &ranges_)
 
void initialize (const std::vector< double > &ranges_)
 
void initialize (const histogram &h_, const std::vector< std::string > &imported_aux_prefixes_)
 
void initialize (const histogram_2d &h_, int bin_axis_, const std::vector< std::string > &imported_aux_prefixes_)
 
void init (size_t n_, double min_, double max_, unsigned int mode_=BIN_MODE_LINEAR)
 
void destroy ()
 Destroy the histogram structure, making the histogram invalid. More...
 
 histogram ()
 
 histogram (size_t n_, double min_, double max_, unsigned int mode_=BIN_MODE_LINEAR)
 
 histogram (const std::vector< double > &ranges_)
 
virtual ~histogram ()
 
 histogram (const histogram &)
 
histogramoperator= (const histogram &)
 
bool is_inside (double x_) const
 
void accumulate (double x_, double weight_=1.0)
 
void fill (double x_, double weight_=1.0)
 
void fill (int i_, double safe_delta_=1e-7, double weight_=1.0)
 
void set (size_t i_, double value_)
 
double underflow () const
 
double overflow () const
 
double min () const
 
double max () const
 
size_t bins () const
 
double get (size_t i_) const
 
double at (size_t i_) const
 
double operator[] (size_t i_) const
 
bool find (double x_, size_t &i_) const
 
void reset ()
 Reset the bin contents to zero. More...
 
bool can_rebin (size_t new_bins_) const
 
void rebin (size_t new_bins_)
 
bool are_underflow_overflow_available () const
 
void invalidate_underflow_overflow ()
 
void reset_underflow_overflow ()
 
void increment_underflow (double weight_)
 
void increment_overflow (double weight_)
 
bool is_counts_available () const
 
int32_t counts () const
 
void invalidate_counters ()
 
void reset_counters ()
 
void reset_counts ()
 
void increment_counts ()
 
void invalidate_counts ()
 
double min_val () const
 
double max_val () const
 
size_t min_bin () const
 
size_t max_bin () const
 
double mean () const
 
double sigma () const
 
double sum () const
 
double sum (size_t begin_, size_t end_) const
 
void to_stream (std::ostream &) const
 
void from_stream (std::istream &)
 
void print (std::ostream &, int precision_=9) const
 
void print_ascii (std::ostream &, int mode_=0) const
 
void dump (std::ostream &, int precision_=9) const
 
bool has_size (size_t bins_) const
 
std::pair< double, double > get_range (size_t i_) const
 
void shift (double s_)
 
void scale (double s_)
 
void negate ()
 
void zero ()
 
bool same (const histogram &) const
 
void add (const histogram &)
 
void sub (const histogram &)
 
void mul (const histogram &)
 
void div (const histogram &)
 
histogramoperator+= (const histogram &)
 
histogramoperator-= (const histogram &)
 
histogramoperator *= (const histogram &)
 
histogramoperator/= (const histogram &)
 
histogramoperator+= (double)
 
histogramoperator-= (double)
 
histogramoperator- ()
 
histogramoperator *= (double)
 
histogramoperator/= (double)
 
virtual void tree_dump (std::ostream &out=std::clog, const std::string &title="", const std::string &indent="", bool inherit=false) const
 Main interface method for smart dump. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Friends

histogram operator+ (const histogram &, const histogram &)
 
histogram operator- (const histogram &, const histogram &)
 
histogram operator * (const histogram &, const histogram &)
 
histogram operator/ (const histogram &, const histogram &)
 
histogram operator * (double, const histogram &)
 
histogram operator * (const histogram &, double)
 
histogram operator/ (const histogram &, double)
 

Additional Inherited Members

- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Detailed Description

One dimensional histogram.

Constructor & Destructor Documentation

◆ histogram() [1/4]

mygsl::histogram::histogram ( )

◆ histogram() [2/4]

mygsl::histogram::histogram ( size_t  n_,
double  min_,
double  max_,
unsigned int  mode_ = BIN_MODE_LINEAR 
)

◆ histogram() [3/4]

mygsl::histogram::histogram ( const std::vector< double > &  ranges_)

◆ ~histogram()

virtual mygsl::histogram::~histogram ( )
virtual

◆ histogram() [4/4]

mygsl::histogram::histogram ( const histogram )

Member Function Documentation

◆ accumulate()

void mygsl::histogram::accumulate ( double  x_,
double  weight_ = 1.0 
)

◆ add()

void mygsl::histogram::add ( const histogram )

◆ are_underflow_overflow_available()

bool mygsl::histogram::are_underflow_overflow_available ( ) const

◆ at()

double mygsl::histogram::at ( size_t  i_) const

◆ bins()

size_t mygsl::histogram::bins ( ) const

◆ can_rebin()

bool mygsl::histogram::can_rebin ( size_t  new_bins_) const

◆ counts()

int32_t mygsl::histogram::counts ( ) const

◆ destroy()

void mygsl::histogram::destroy ( )

Destroy the histogram structure, making the histogram invalid.

◆ div()

void mygsl::histogram::div ( const histogram )

◆ dump()

void mygsl::histogram::dump ( std::ostream &  ,
int  precision_ = 9 
) const

◆ fill() [1/2]

void mygsl::histogram::fill ( double  x_,
double  weight_ = 1.0 
)

◆ fill() [2/2]

void mygsl::histogram::fill ( int  i_,
double  safe_delta_ = 1e-7,
double  weight_ = 1.0 
)

◆ find()

bool mygsl::histogram::find ( double  x_,
size_t &  i_ 
) const

◆ from_stream()

void mygsl::histogram::from_stream ( std::istream &  )

◆ get()

double mygsl::histogram::get ( size_t  i_) const

◆ get_auxiliaries()

const datatools::properties& mygsl::histogram::get_auxiliaries ( ) const

◆ get_binning_info()

double mygsl::histogram::get_binning_info ( ) const

◆ get_logarithmic_binning()

double mygsl::histogram::get_logarithmic_binning ( ) const

◆ get_range()

std::pair<double,double> mygsl::histogram::get_range ( size_t  i_) const

◆ get_uniform_binning()

double mygsl::histogram::get_uniform_binning ( ) const

◆ grab_auxiliaries()

datatools::properties& mygsl::histogram::grab_auxiliaries ( )

◆ has_size()

bool mygsl::histogram::has_size ( size_t  bins_) const

◆ increment_counts()

void mygsl::histogram::increment_counts ( )

◆ increment_overflow()

void mygsl::histogram::increment_overflow ( double  weight_)

◆ increment_underflow()

void mygsl::histogram::increment_underflow ( double  weight_)

◆ init() [1/2]

void mygsl::histogram::init ( const std::vector< double > &  ranges_)

◆ init() [2/2]

void mygsl::histogram::init ( size_t  n_,
double  min_,
double  max_,
unsigned int  mode_ = BIN_MODE_LINEAR 
)

◆ initialize() [1/4]

void mygsl::histogram::initialize ( size_t  n_,
double  min_,
double  max_,
unsigned int  mode_ = BIN_MODE_LINEAR 
)

◆ initialize() [2/4]

void mygsl::histogram::initialize ( const std::vector< double > &  ranges_)

◆ initialize() [3/4]

void mygsl::histogram::initialize ( const histogram h_,
const std::vector< std::string > &  imported_aux_prefixes_ 
)

◆ initialize() [4/4]

void mygsl::histogram::initialize ( const histogram_2d h_,
int  bin_axis_,
const std::vector< std::string > &  imported_aux_prefixes_ 
)

◆ invalidate_counters()

void mygsl::histogram::invalidate_counters ( )

◆ invalidate_counts()

void mygsl::histogram::invalidate_counts ( )

◆ invalidate_underflow_overflow()

void mygsl::histogram::invalidate_underflow_overflow ( )

◆ is_any_binning()

bool mygsl::histogram::is_any_binning ( ) const

◆ is_counts_available()

bool mygsl::histogram::is_counts_available ( ) const

◆ is_initialized()

bool mygsl::histogram::is_initialized ( ) const

◆ is_inside()

bool mygsl::histogram::is_inside ( double  x_) const

◆ is_logarithmic_binning()

bool mygsl::histogram::is_logarithmic_binning ( ) const

◆ is_uniform_binning()

bool mygsl::histogram::is_uniform_binning ( ) const

◆ max()

double mygsl::histogram::max ( ) const

◆ max_bin()

size_t mygsl::histogram::max_bin ( ) const

◆ max_val()

double mygsl::histogram::max_val ( ) const

◆ mean()

double mygsl::histogram::mean ( ) const

◆ min()

double mygsl::histogram::min ( ) const

◆ min_bin()

size_t mygsl::histogram::min_bin ( ) const

◆ min_val()

double mygsl::histogram::min_val ( ) const

◆ mul()

void mygsl::histogram::mul ( const histogram )

◆ negate()

void mygsl::histogram::negate ( )

◆ operator *=() [1/2]

histogram& mygsl::histogram::operator *= ( const histogram )

◆ operator *=() [2/2]

histogram& mygsl::histogram::operator *= ( double  )

◆ operator+=() [1/2]

histogram& mygsl::histogram::operator+= ( const histogram )

◆ operator+=() [2/2]

histogram& mygsl::histogram::operator+= ( double  )

◆ operator-()

histogram& mygsl::histogram::operator- ( )

◆ operator-=() [1/2]

histogram& mygsl::histogram::operator-= ( const histogram )

◆ operator-=() [2/2]

histogram& mygsl::histogram::operator-= ( double  )

◆ operator/=() [1/2]

histogram& mygsl::histogram::operator/= ( const histogram )

◆ operator/=() [2/2]

histogram& mygsl::histogram::operator/= ( double  )

◆ operator=()

histogram& mygsl::histogram::operator= ( const histogram )

◆ operator[]()

double mygsl::histogram::operator[] ( size_t  i_) const

◆ overflow()

double mygsl::histogram::overflow ( ) const

◆ print()

void mygsl::histogram::print ( std::ostream &  ,
int  precision_ = 9 
) const

◆ print_ascii()

void mygsl::histogram::print_ascii ( std::ostream &  ,
int  mode_ = 0 
) const

◆ rebin()

void mygsl::histogram::rebin ( size_t  new_bins_)

◆ reset()

void mygsl::histogram::reset ( )

Reset the bin contents to zero.

◆ reset_counters()

void mygsl::histogram::reset_counters ( )

◆ reset_counts()

void mygsl::histogram::reset_counts ( )

◆ reset_underflow_overflow()

void mygsl::histogram::reset_underflow_overflow ( )

◆ same()

bool mygsl::histogram::same ( const histogram ) const

◆ scale()

void mygsl::histogram::scale ( double  s_)

◆ set()

void mygsl::histogram::set ( size_t  i_,
double  value_ 
)

◆ shift()

void mygsl::histogram::shift ( double  s_)

◆ sigma()

double mygsl::histogram::sigma ( ) const

◆ sub()

void mygsl::histogram::sub ( const histogram )

◆ sum() [1/2]

double mygsl::histogram::sum ( ) const

◆ sum() [2/2]

double mygsl::histogram::sum ( size_t  begin_,
size_t  end_ 
) const

◆ to_stream()

void mygsl::histogram::to_stream ( std::ostream &  ) const

◆ tree_dump()

virtual void mygsl::histogram::tree_dump ( std::ostream &  out = std::clog,
const std::string &  title = "",
const std::string &  indent = "",
bool  inherit = false 
) const
virtual

Main interface method for smart dump.

Reimplemented from datatools::i_tree_dumpable.

◆ underflow()

double mygsl::histogram::underflow ( ) const

◆ zero()

void mygsl::histogram::zero ( )

Friends And Related Function Documentation

◆ operator * [1/3]

histogram operator * ( const histogram ,
const histogram  
)
friend

◆ operator * [2/3]

histogram operator * ( double  ,
const histogram  
)
friend

◆ operator * [3/3]

histogram operator * ( const histogram ,
double   
)
friend

◆ operator+

histogram operator+ ( const histogram ,
const histogram  
)
friend

◆ operator-

histogram operator- ( const histogram ,
const histogram  
)
friend

◆ operator/ [1/2]

histogram operator/ ( const histogram ,
const histogram  
)
friend

◆ operator/ [2/2]

histogram operator/ ( const histogram ,
double   
)
friend

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