yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.0
YODA::YDbnMixin< Derived > Struct Template Reference

CRTP mixin introducing convenience aliases along Y axis. More...

#include <DbnUtils.h>

Public Member Functions

Dbn axis scalings
void scaleY (double factor)
 
void scaleXY (double fx, double fy)
 
Dbn statistics
double yMean () const
 
double yVariance () const
 
double yStdDev () const
 
double yStdErr () const
 
double yRMS () const
 
double sumWY () const
 
double sumWY2 () const
 
double sumWXY () const
 

Detailed Description

template<class Derived>
struct YODA::YDbnMixin< Derived >

CRTP mixin introducing convenience aliases along Y axis.

Definition at line 49 of file DbnUtils.h.

Member Function Documentation

◆ scaleXY()

template<class Derived >
void YODA::YDbnMixin< Derived >::scaleXY ( double  fx,
double  fy 
)
inline

Definition at line 56 of file DbnUtils.h.

56 {
57 static_cast<Derived*>(this)->scale(1,fx);
58 static_cast<Derived*>(this)->scale(2,fy);
59 }

◆ scaleY()

template<class Derived >
void YODA::YDbnMixin< Derived >::scaleY ( double  factor)
inline

Definition at line 54 of file DbnUtils.h.

54{ static_cast<Derived*>(this)->scale(2,factor); }

◆ sumWXY()

template<class Derived >
double YODA::YDbnMixin< Derived >::sumWXY ( ) const
inline

Definition at line 73 of file DbnUtils.h.

73{ return static_cast<const Derived*>(this)->crossTerm(0,1); }

◆ sumWY()

template<class Derived >
double YODA::YDbnMixin< Derived >::sumWY ( ) const
inline

Definition at line 71 of file DbnUtils.h.

71{ return static_cast<const Derived*>(this)->sumW(2); }

◆ sumWY2()

template<class Derived >
double YODA::YDbnMixin< Derived >::sumWY2 ( ) const
inline

Definition at line 72 of file DbnUtils.h.

72{ return static_cast<const Derived*>(this)->sumW2(2); }

◆ yMean()

template<class Derived >
double YODA::YDbnMixin< Derived >::yMean ( ) const
inline

Definition at line 66 of file DbnUtils.h.

66{ return static_cast<const Derived*>(this)->mean(2); }
double mean(const std::vector< int > &sample)
Calculate the mean of a sample.
Definition MathUtils.h:391

References YODA::mean().

◆ yRMS()

template<class Derived >
double YODA::YDbnMixin< Derived >::yRMS ( ) const
inline

Definition at line 70 of file DbnUtils.h.

70{ return static_cast<const Derived*>(this)->RMS(2); }
double RMS(const double sumWX2, const double sumW, const double sumW2)
Calculate the weighted RMS of a sample.
Definition MathUtils.h:489

References YODA::RMS().

◆ yStdDev()

template<class Derived >
double YODA::YDbnMixin< Derived >::yStdDev ( ) const
inline

Definition at line 68 of file DbnUtils.h.

68{ return static_cast<const Derived*>(this)->stdDev(2); }
double stdDev(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted standard deviation of a sample.
Definition MathUtils.h:458

References YODA::stdDev().

◆ yStdErr()

template<class Derived >
double YODA::YDbnMixin< Derived >::yStdErr ( ) const
inline

Definition at line 69 of file DbnUtils.h.

69{ return static_cast<const Derived*>(this)->stdErr(2); }
double stdErr(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted standard error of a sample.
Definition MathUtils.h:470

References YODA::stdErr().

◆ yVariance()

template<class Derived >
double YODA::YDbnMixin< Derived >::yVariance ( ) const
inline

Definition at line 67 of file DbnUtils.h.

67{ return static_cast<const Derived*>(this)->variance(2); }
double variance(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted variance of a sample.
Definition MathUtils.h:421

References YODA::variance().


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