herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
exsample::fast_small_histogram< Statistics > Struct Template Reference

Fast, zero memory-overhead one-dimensional histogram with 2^n equally spaced bins. More...

#include <utility.h>

Public Member Functions

 fast_small_histogram ()
 default constructor
 
 fast_small_histogram (const fast_small_histogram &x)
 copy constructor
 
fast_small_histogramoperator= (const fast_small_histogram &x)
 assignment
 
 fast_small_histogram (std::size_t d)
 construct from depth d, creating 2^d bins
 
Statistics & bin (double lower, double upper, double event)
 return the bin from event belongs to given outer boundaries
 
template<class OStream >
void put (OStream &os) const
 put histogram to an ostream
 
template<class IStream >
void get (IStream &is)
 get histogram from an istream
 

Public Attributes

std::size_t depth
 the depth, defining a histogram of 2^depth bins
 
std::unique_ptr< Statistics[]> bins
 the contained statistics objects
 

Detailed Description

template<class Statistics>
struct exsample::fast_small_histogram< Statistics >

Fast, zero memory-overhead one-dimensional histogram with 2^n equally spaced bins.

Definition at line 174 of file utility.h.

Constructor & Destructor Documentation

◆ fast_small_histogram() [1/3]

template<class Statistics >
exsample::fast_small_histogram< Statistics >::fast_small_histogram ( )
inline

default constructor

Definition at line 177 of file utility.h.

◆ fast_small_histogram() [2/3]

template<class Statistics >
exsample::fast_small_histogram< Statistics >::fast_small_histogram ( const fast_small_histogram< Statistics > &  x)
inline

◆ fast_small_histogram() [3/3]

template<class Statistics >
exsample::fast_small_histogram< Statistics >::fast_small_histogram ( std::size_t  d)
inlineexplicit

construct from depth d, creating 2^d bins

Definition at line 205 of file utility.h.

References exsample::fast_small_histogram< Statistics >::bins.

Member Function Documentation

◆ bin()

template<class Statistics >
Statistics & exsample::fast_small_histogram< Statistics >::bin ( double  lower,
double  upper,
double  event 
)
inline

return the bin from event belongs to given outer boundaries

Definition at line 211 of file utility.h.

References exsample::fast_small_histogram< Statistics >::bins, and exsample::fast_small_histogram< Statistics >::depth.

◆ get()

template<class Statistics >
template<class IStream >
void exsample::fast_small_histogram< Statistics >::get ( IStream &  is)
inline

get histogram from an istream

Definition at line 251 of file utility.h.

References exsample::fast_small_histogram< Statistics >::bins, and exsample::fast_small_histogram< Statistics >::depth.

◆ operator=()

template<class Statistics >
fast_small_histogram & exsample::fast_small_histogram< Statistics >::operator= ( const fast_small_histogram< Statistics > &  x)
inline

◆ put()

template<class Statistics >
template<class OStream >
void exsample::fast_small_histogram< Statistics >::put ( OStream &  os) const
inline

Member Data Documentation

◆ bins

◆ depth


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