DbnBase & operator= (const DbnBase &)=default
DbnBase & operator= (DbnBase &&)=default
DbnBase ()
Default constructor of a new distribution.
template<size_t dim = N, typename = std::enable_if_t<(dim < 2)>>
DbnBase (const double numEntries , const std::array< double, N+1 > &sumW , const std::array< double, N+1 > &sumW2 )
Constructor to set a distribution with a pre-filled state.
template<size_t dim = N, typename = std::enable_if_t<(dim >= 2)>>
DbnBase (const double numEntries , const std::array< double, N+1 > &sumW , const std::array< double, N+1 > &sumW2 , const std::array< double, N *(N-1)/2 > &sumWcross)
Constructor to set a distribution with a pre-filled state.
DbnBase (const DbnBase &)=default
DbnBase (DbnBase &&)=default
DbnBase & operator= (const DbnBase &)=default
DbnBase & operator= (DbnBase &&)=default
void fill (const std::array< double, N > vals, const double weight=1.0, const double fraction=1.0)
Contribute a sample at val (from an array) with weight weight .
template<typename... Args>
void fill (Args &&... args)
Templated convenience overload of fill method.
void set (const double numEntries , const std::array< double, N+1 > &sumW , const std::array< double, N+1 > &sumW2 , const std::array< double, N *(N-1)/2 > &sumWcross)
Set a sample with array-based number of entries numEntries , sum of weights sumW (and corresponding moments), sum of squared weights sumW2 (and corresponding moments).
void set (const double numEntries , const std::vector< double > &sumW , const std::vector< double > &sumW2 , const std::vector< double > &sumWcross={})
Set a sample with vector-based number of entries numEntries , sum of weights sumW (and corresponding moments), sum of squared weights sumW2 (and corresponding moments).
void set (const DbnBase < N > &other)
Set a sample with other .
void set (DbnBase < N > &&other)
Set a sample with other .
void reset ()
Reset the internal counters.
void scaleW (const double scalefactor)
Rescale as if all fill weights had been different by factor scalefactor .
void scale (const size_t dim , const double factor)
double errW () const
The absolute error on sumW.
double relErrW () const
The relative error on sumW.
double mean (const size_t i) const
Weighted mean, , of distribution.
double variance (const size_t i) const
Weighted variance, , of distribution.
double stdDev (const size_t i) const
Weighted standard deviation, , of distribution.
double stdErr (const size_t i) const
Weighted standard error on the mean, , of distribution.
double relStdErr (const size_t i) const
Relative weighted standard error on the mean, , of distribution.
double RMS (const size_t i) const
Weighted RMS, , of distribution.
double numEntries () const
Number of entries (number of times fill
was called, ignoring weights)
double effNumEntries () const
Effective number of entries .
double sumW () const
The sum of weights.
double sumW2 () const
The sum of weights squared.
double sumW (const size_t i) const
The sum of x*weight.
double sumW2 (const size_t i) const
The sum of x^2*weight.
template<size_t dim = N, typename = std::enable_if_t<(dim >= 2)>>
double crossTerm (const size_t A1, const size_t A2) const
The second-order cross term between axes k and l .
size_t dim () const
std::string toString () const
String representation of the DbnBase for debugging.
template<typename... size_t>
DbnBase < sizeof...(size_t)> reduceTo (size_t... axes) const
Reduce operation that produces a lower-dimensional DbnBase keeping only the specified axes in the new DbnBase .
template<size_t... Is>
DbnBase < sizeof...(Is)> reduceTo (std::index_sequence< Is... >) const
Same as above but using an std::integer_sequence.
template<size_t... axes>
auto reduce () const
Reduce operation that produces a lower-dimensional DbnBase removing the specified axes for the new DbnBase .
DbnBase & operator+= (const DbnBase &d)
Add two DbnBases.
DbnBase & operator+= (DbnBase &&d)
Add two DbnBases.
DbnBase & operator-= (const DbnBase &d)
Subtract one DbnBase from another.
DbnBase & operator-= (DbnBase &&d)
Subtract one DbnBase from another.
template<size_t N>
class YODA::Dbn< N >
User-facing Dbn class inheriting from DbnBase .
Definition at line 637 of file Dbn.h .