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

CRTP mixin introducing convenience aliases to access statistics along X axis. More...

#include <BinnedUtils.h>

Public Member Functions

Whole histo data
double xMean (const bool includeOverflows=true) const noexcept
 Calculate the mean on X axis.
 
double xVariance (const bool includeOverflows=true) const noexcept
 Calculate the variance on X axis.
 
double xStdDev (const bool includeOverflows=true) const noexcept
 Calculate the standard deviation on X axis.
 
double xStdErr (const bool includeOverflows=true) const noexcept
 Calculate the standard error on X axis.
 
double xRMS (const bool includeOverflows=true) const noexcept
 Calculate the RMS on X axis.
 

Detailed Description

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

CRTP mixin introducing convenience aliases to access statistics along X axis.

Definition at line 73 of file BinnedUtils.h.

Member Function Documentation

◆ xMean()

template<class Derived >
double YODA::XStatsMixin< Derived >::xMean ( const bool  includeOverflows = true) const
inlinenoexcept

Calculate the mean on X axis.

Definition at line 79 of file BinnedUtils.h.

79 {
80 return static_cast<const Derived*>(this)->mean(0, includeOverflows);
81 }
double mean(const std::vector< int > &sample)
Calculate the mean of a sample.
Definition MathUtils.h:391

References YODA::mean().

◆ xRMS()

template<class Derived >
double YODA::XStatsMixin< Derived >::xRMS ( const bool  includeOverflows = true) const
inlinenoexcept

Calculate the RMS on X axis.

Definition at line 99 of file BinnedUtils.h.

99 {
100 return static_cast<const Derived*>(this)->rms(0, includeOverflows);
101 }

◆ xStdDev()

template<class Derived >
double YODA::XStatsMixin< Derived >::xStdDev ( const bool  includeOverflows = true) const
inlinenoexcept

Calculate the standard deviation on X axis.

Definition at line 89 of file BinnedUtils.h.

89 {
90 return static_cast<const Derived*>(this)->stdDev(0, includeOverflows);
91 }
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().

◆ xStdErr()

template<class Derived >
double YODA::XStatsMixin< Derived >::xStdErr ( const bool  includeOverflows = true) const
inlinenoexcept

Calculate the standard error on X axis.

Definition at line 94 of file BinnedUtils.h.

94 {
95 return static_cast<const Derived*>(this)->stdErr(0, includeOverflows);
96 }
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().

◆ xVariance()

template<class Derived >
double YODA::XStatsMixin< Derived >::xVariance ( const bool  includeOverflows = true) const
inlinenoexcept

Calculate the variance on X axis.

Definition at line 84 of file BinnedUtils.h.

84 {
85 return static_cast<const Derived*>(this)->variance(0, includeOverflows);
86 }
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: