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

Two dimensional histogram. More...

#include <bayeux/mygsl/histogram_2d.h>

Inheritance diagram for mygsl::histogram_2d:
datatools::i_serializable

Classes

class  pdf
 

Public Member Functions

const datatools::propertiesget_auxiliaries () const
 
datatools::propertiesgrab_auxiliaries ()
 
double get_x_binning_info () const
 
double get_y_binning_info () const
 
bool is_uniform_x_binning () const
 
bool is_logarithmic_x_binning () const
 
bool is_any_x_binning () const
 
double get_uniform_x_binning () const
 
double get_logarithmic_x_binning () const
 
bool is_uniform_y_binning () const
 
bool is_logarithmic_y_binning () const
 
bool is_any_y_binning () const
 
double get_uniform_y_binning () const
 
double get_logarithmic_y_binning () const
 
bool is_initialized () const
 
void initialize (size_t nx_, double xmin_, double xmax_, size_t ny_, double ymin_, double ymax_, unsigned int xmode_=BIN_MODE_LINEAR, unsigned int ymode_=BIN_MODE_LINEAR)
 
void initialize (const std::vector< double > &xranges_, const std::vector< double > &yranges_)
 
void initialize (const histogram &hx_, const histogram &hy_, const std::vector< std::string > &imported_aux_prefixes_)
 
void initialize (const histogram_2d &h_, const std::vector< std::string > &imported_aux_prefixes_)
 
void init (size_t nx_, double xmin_, double xmax_, size_t ny_, double ymin_, double ymax_, unsigned int xmode_=BIN_MODE_LINEAR, unsigned int ymode_=BIN_MODE_LINEAR)
 
void init (const std::vector< double > &xranges_, const std::vector< double > &yranges_)
 
void destroy ()
 Destroy the histogram structure, making the histogram invalid. More...
 
bool are_underflow_overflow_available () const
 
void invalidate_underflow_overflow ()
 
void reset_underflow_overflow ()
 
void increment_x_underflow (double weight_)
 
void increment_x_overflow (double weight_)
 
void increment_y_underflow (double weight_)
 
void increment_y_overflow (double weight_)
 
void invalidate_counters ()
 
void reset_counters ()
 
bool is_counts_available () const
 
int32_t counts () const
 
void reset_counts ()
 
void increment_counts ()
 
void invalidate_counts ()
 
 histogram_2d ()
 
 histogram_2d (size_t nx_, double xmin_, double xmax_, size_t ny_, double ymin_, double ymax_, unsigned int xmode_=BIN_MODE_LINEAR, unsigned int ymode_=BIN_MODE_LINEAR)
 
 histogram_2d (const std::vector< double > &xranges_, const std::vector< double > &yranges_)
 
virtual ~histogram_2d ()
 
 histogram_2d (const histogram_2d &)
 
histogram_2doperator= (const histogram_2d &)
 
bool is_inside (double x_, double y_) const
 
void accumulate (double x_, double y_, double weight_=1.0)
 
void fill (double x_, double y_, double weight_=1.0)
 
void fill (int i_, double y_, double safe_x_delta_=1e-7, double weight_=1.0)
 
void fill (double x_, int j_, double safe_y_delta_=1e-7, double weight_=1.0)
 
void fill (int i_, int j_, double safe_x_delta_=1e-7, double safe_y_delta_=1e-7, double weight_=1.0)
 
double underflow_x () const
 
double overflow_x () const
 
double underflow_y () const
 
double overflow_y () const
 
double xmin () const
 
double xmax () const
 
double ymin () const
 
double ymax () const
 
size_t xbins () const
 
size_t ybins () const
 
void set (size_t ix_, size_t iy_, double value_)
 
double get (size_t ix_, size_t iy_) const
 
double at (size_t ix_, size_t iy_) const
 
bool find (double x_, double y_, size_t &i_, size_t &j_) const
 
void reset ()
 Reset the bin contents to zero. More...
 
double min_val () const
 
double max_val () const
 
void min_bin (size_t &i_, size_t &j_) const
 
void max_bin (size_t &i_, size_t &j_) const
 
double xmean () const
 
double xsigma () const
 
double ymean () const
 
double ysigma () const
 
double sum () const
 
double cov () const
 
void to_stream (std::ostream &) const
 
void from_stream (std::istream &)
 
void print (std::ostream &, int precision_=9, bool x_skip_line_=true) const
 
void dump (std::ostream &, int precision_=9) const
 
bool has_size (size_t xbins_, size_t ybins_) const
 
bool has_xsize (size_t xbins_) const
 
bool has_ysize (size_t ybins_) const
 
std::pair< double, double > get_xrange (size_t i_) const
 
std::pair< double, double > get_yrange (size_t j_) const
 
void shift (double s_)
 
void scale (double s_)
 
void negate ()
 
void zero ()
 
bool same (const histogram_2d &) const
 
void add (const histogram_2d &)
 
void sub (const histogram_2d &)
 
void mul (const histogram_2d &)
 
void div (const histogram_2d &)
 
histogram_2doperator+= (const histogram_2d &)
 
histogram_2doperator-= (const histogram_2d &)
 
histogram_2doperator *= (const histogram_2d &)
 
histogram_2doperator/= (const histogram_2d &)
 
histogram_2doperator+= (double)
 
histogram_2doperator-= (double)
 
histogram_2doperator- ()
 
histogram_2doperator *= (double)
 
histogram_2doperator/= (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...
 

Friends

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

Detailed Description

Two dimensional histogram.

Constructor & Destructor Documentation

◆ histogram_2d() [1/4]

mygsl::histogram_2d::histogram_2d ( )

◆ histogram_2d() [2/4]

mygsl::histogram_2d::histogram_2d ( size_t  nx_,
double  xmin_,
double  xmax_,
size_t  ny_,
double  ymin_,
double  ymax_,
unsigned int  xmode_ = BIN_MODE_LINEAR,
unsigned int  ymode_ = BIN_MODE_LINEAR 
)

◆ histogram_2d() [3/4]

mygsl::histogram_2d::histogram_2d ( const std::vector< double > &  xranges_,
const std::vector< double > &  yranges_ 
)

◆ ~histogram_2d()

virtual mygsl::histogram_2d::~histogram_2d ( )
virtual

◆ histogram_2d() [4/4]

mygsl::histogram_2d::histogram_2d ( const histogram_2d )

Member Function Documentation

◆ accumulate()

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

◆ add()

void mygsl::histogram_2d::add ( const histogram_2d )

◆ are_underflow_overflow_available()

bool mygsl::histogram_2d::are_underflow_overflow_available ( ) const

◆ at()

double mygsl::histogram_2d::at ( size_t  ix_,
size_t  iy_ 
) const

◆ counts()

int32_t mygsl::histogram_2d::counts ( ) const

◆ cov()

double mygsl::histogram_2d::cov ( ) const

◆ destroy()

void mygsl::histogram_2d::destroy ( )

Destroy the histogram structure, making the histogram invalid.

◆ div()

void mygsl::histogram_2d::div ( const histogram_2d )

◆ dump()

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

◆ fill() [1/4]

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

◆ fill() [2/4]

void mygsl::histogram_2d::fill ( int  i_,
double  y_,
double  safe_x_delta_ = 1e-7,
double  weight_ = 1.0 
)

◆ fill() [3/4]

void mygsl::histogram_2d::fill ( double  x_,
int  j_,
double  safe_y_delta_ = 1e-7,
double  weight_ = 1.0 
)

◆ fill() [4/4]

void mygsl::histogram_2d::fill ( int  i_,
int  j_,
double  safe_x_delta_ = 1e-7,
double  safe_y_delta_ = 1e-7,
double  weight_ = 1.0 
)

◆ find()

bool mygsl::histogram_2d::find ( double  x_,
double  y_,
size_t &  i_,
size_t &  j_ 
) const

◆ from_stream()

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

◆ get()

double mygsl::histogram_2d::get ( size_t  ix_,
size_t  iy_ 
) const

◆ get_auxiliaries()

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

◆ get_logarithmic_x_binning()

double mygsl::histogram_2d::get_logarithmic_x_binning ( ) const

◆ get_logarithmic_y_binning()

double mygsl::histogram_2d::get_logarithmic_y_binning ( ) const

◆ get_uniform_x_binning()

double mygsl::histogram_2d::get_uniform_x_binning ( ) const

◆ get_uniform_y_binning()

double mygsl::histogram_2d::get_uniform_y_binning ( ) const

◆ get_x_binning_info()

double mygsl::histogram_2d::get_x_binning_info ( ) const

◆ get_xrange()

std::pair<double,double> mygsl::histogram_2d::get_xrange ( size_t  i_) const

◆ get_y_binning_info()

double mygsl::histogram_2d::get_y_binning_info ( ) const

◆ get_yrange()

std::pair<double,double> mygsl::histogram_2d::get_yrange ( size_t  j_) const

◆ grab_auxiliaries()

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

◆ has_size()

bool mygsl::histogram_2d::has_size ( size_t  xbins_,
size_t  ybins_ 
) const

◆ has_xsize()

bool mygsl::histogram_2d::has_xsize ( size_t  xbins_) const

◆ has_ysize()

bool mygsl::histogram_2d::has_ysize ( size_t  ybins_) const

◆ increment_counts()

void mygsl::histogram_2d::increment_counts ( )

◆ increment_x_overflow()

void mygsl::histogram_2d::increment_x_overflow ( double  weight_)

◆ increment_x_underflow()

void mygsl::histogram_2d::increment_x_underflow ( double  weight_)

◆ increment_y_overflow()

void mygsl::histogram_2d::increment_y_overflow ( double  weight_)

◆ increment_y_underflow()

void mygsl::histogram_2d::increment_y_underflow ( double  weight_)

◆ init() [1/2]

void mygsl::histogram_2d::init ( size_t  nx_,
double  xmin_,
double  xmax_,
size_t  ny_,
double  ymin_,
double  ymax_,
unsigned int  xmode_ = BIN_MODE_LINEAR,
unsigned int  ymode_ = BIN_MODE_LINEAR 
)

◆ init() [2/2]

void mygsl::histogram_2d::init ( const std::vector< double > &  xranges_,
const std::vector< double > &  yranges_ 
)

◆ initialize() [1/4]

void mygsl::histogram_2d::initialize ( size_t  nx_,
double  xmin_,
double  xmax_,
size_t  ny_,
double  ymin_,
double  ymax_,
unsigned int  xmode_ = BIN_MODE_LINEAR,
unsigned int  ymode_ = BIN_MODE_LINEAR 
)

◆ initialize() [2/4]

void mygsl::histogram_2d::initialize ( const std::vector< double > &  xranges_,
const std::vector< double > &  yranges_ 
)

◆ initialize() [3/4]

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

◆ initialize() [4/4]

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

◆ invalidate_counters()

void mygsl::histogram_2d::invalidate_counters ( )

◆ invalidate_counts()

void mygsl::histogram_2d::invalidate_counts ( )

◆ invalidate_underflow_overflow()

void mygsl::histogram_2d::invalidate_underflow_overflow ( )

◆ is_any_x_binning()

bool mygsl::histogram_2d::is_any_x_binning ( ) const

◆ is_any_y_binning()

bool mygsl::histogram_2d::is_any_y_binning ( ) const

◆ is_counts_available()

bool mygsl::histogram_2d::is_counts_available ( ) const

◆ is_initialized()

bool mygsl::histogram_2d::is_initialized ( ) const

◆ is_inside()

bool mygsl::histogram_2d::is_inside ( double  x_,
double  y_ 
) const

◆ is_logarithmic_x_binning()

bool mygsl::histogram_2d::is_logarithmic_x_binning ( ) const

◆ is_logarithmic_y_binning()

bool mygsl::histogram_2d::is_logarithmic_y_binning ( ) const

◆ is_uniform_x_binning()

bool mygsl::histogram_2d::is_uniform_x_binning ( ) const

◆ is_uniform_y_binning()

bool mygsl::histogram_2d::is_uniform_y_binning ( ) const

◆ max_bin()

void mygsl::histogram_2d::max_bin ( size_t &  i_,
size_t &  j_ 
) const

◆ max_val()

double mygsl::histogram_2d::max_val ( ) const

◆ min_bin()

void mygsl::histogram_2d::min_bin ( size_t &  i_,
size_t &  j_ 
) const

◆ min_val()

double mygsl::histogram_2d::min_val ( ) const

◆ mul()

void mygsl::histogram_2d::mul ( const histogram_2d )

◆ negate()

void mygsl::histogram_2d::negate ( )

◆ operator *=() [1/2]

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

◆ operator *=() [2/2]

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

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

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

◆ operator-()

histogram_2d& mygsl::histogram_2d::operator- ( )

◆ operator-=() [1/2]

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

◆ operator-=() [2/2]

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

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

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

◆ operator=()

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

◆ overflow_x()

double mygsl::histogram_2d::overflow_x ( ) const

◆ overflow_y()

double mygsl::histogram_2d::overflow_y ( ) const

◆ print()

void mygsl::histogram_2d::print ( std::ostream &  ,
int  precision_ = 9,
bool  x_skip_line_ = true 
) const

◆ reset()

void mygsl::histogram_2d::reset ( )

Reset the bin contents to zero.

◆ reset_counters()

void mygsl::histogram_2d::reset_counters ( )

◆ reset_counts()

void mygsl::histogram_2d::reset_counts ( )

◆ reset_underflow_overflow()

void mygsl::histogram_2d::reset_underflow_overflow ( )

◆ same()

bool mygsl::histogram_2d::same ( const histogram_2d ) const

◆ scale()

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

◆ set()

void mygsl::histogram_2d::set ( size_t  ix_,
size_t  iy_,
double  value_ 
)

◆ shift()

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

◆ sub()

void mygsl::histogram_2d::sub ( const histogram_2d )

◆ sum()

double mygsl::histogram_2d::sum ( ) const

◆ to_stream()

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

◆ tree_dump()

virtual void mygsl::histogram_2d::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.

◆ underflow_x()

double mygsl::histogram_2d::underflow_x ( ) const

◆ underflow_y()

double mygsl::histogram_2d::underflow_y ( ) const

◆ xbins()

size_t mygsl::histogram_2d::xbins ( ) const

◆ xmax()

double mygsl::histogram_2d::xmax ( ) const

◆ xmean()

double mygsl::histogram_2d::xmean ( ) const

◆ xmin()

double mygsl::histogram_2d::xmin ( ) const

◆ xsigma()

double mygsl::histogram_2d::xsigma ( ) const

◆ ybins()

size_t mygsl::histogram_2d::ybins ( ) const

◆ ymax()

double mygsl::histogram_2d::ymax ( ) const

◆ ymean()

double mygsl::histogram_2d::ymean ( ) const

◆ ymin()

double mygsl::histogram_2d::ymin ( ) const

◆ ysigma()

double mygsl::histogram_2d::ysigma ( ) const

◆ zero()

void mygsl::histogram_2d::zero ( )

Friends And Related Function Documentation

◆ histogram

friend class histogram
friend

◆ operator * [1/3]

histogram_2d operator * ( const histogram_2d ,
const histogram_2d  
)
friend

◆ operator * [2/3]

histogram_2d operator * ( double  ,
const histogram_2d  
)
friend

◆ operator * [3/3]

histogram_2d operator * ( const histogram_2d ,
double   
)
friend

◆ operator+

histogram_2d operator+ ( const histogram_2d ,
const histogram_2d  
)
friend

◆ operator-

histogram_2d operator- ( const histogram_2d ,
const histogram_2d  
)
friend

◆ operator/ [1/3]

histogram_2d operator/ ( const histogram_2d ,
const histogram_2d  
)
friend

◆ operator/ [2/3]

histogram_2d operator/ ( double  ,
const histogram_2d  
)
friend

◆ operator/ [3/3]

histogram_2d operator/ ( const histogram_2d ,
double   
)
friend

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