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

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

#include <BinnedUtils.h>

Public Member Functions

Bin accessors
size_t numBinsY (const bool includeOverflows=false) const
 Number of bins along the Y axis.
 
template<class T = EdgeT>
enable_if_CAxisT< T > yMin () const
 Low edge of second histo's axis.
 
template<class T = EdgeT>
enable_if_CAxisT< T > yMax () const
 High edge of second histo's axis.
 
std::vector< EdgeT > yEdges (const bool includeOverflows=false) const
 All bin edges on Y axis. +-inf edges are included.
 
template<class T = EdgeT>
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > yWidths (const bool includeOverflows=false) const
 All widths on Y axis.
 
void rebinYBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinYTo (const std::vector< double > &newedges)
 
void rebinY (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinY (const std::vector< double > &newedges)
 

Detailed Description

template<class Derived, typename EdgeT = double>
struct YODA::YAxisMixin< Derived, EdgeT >

CRTP mixin introducing convenience aliases along Y axis.

Definition at line 109 of file BinnedUtils.h.

Member Function Documentation

◆ numBinsY()

template<class Derived , typename EdgeT = double>
size_t YODA::YAxisMixin< Derived, EdgeT >::numBinsY ( const bool  includeOverflows = false) const
inline

Number of bins along the Y axis.

Definition at line 115 of file BinnedUtils.h.

115 {
116 return static_cast<const Derived*>(this)->numBinsAt(1, includeOverflows);
117 }

◆ rebinY() [1/2]

template<class Derived , typename EdgeT = double>
void YODA::YAxisMixin< Derived, EdgeT >::rebinY ( const std::vector< double > &  newedges)
inline

Definition at line 153 of file BinnedUtils.h.

153 {
154 static_cast<Derived*>(this)->template rebinTo<1>(newedges);
155 }

◆ rebinY() [2/2]

template<class Derived , typename EdgeT = double>
void YODA::YAxisMixin< Derived, EdgeT >::rebinY ( unsigned int  n,
size_t  begin = 1,
size_t  end = UINT_MAX 
)
inline

Definition at line 149 of file BinnedUtils.h.

149 {
150 static_cast<Derived*>(this)->template rebinBy<1>(n, begin, end);
151 }

◆ rebinYBy()

template<class Derived , typename EdgeT = double>
void YODA::YAxisMixin< Derived, EdgeT >::rebinYBy ( unsigned int  n,
size_t  begin = 1,
size_t  end = UINT_MAX 
)
inline

Definition at line 141 of file BinnedUtils.h.

141 {
142 static_cast<Derived*>(this)->template rebinBy<1>(n, begin, end);
143 }

◆ rebinYTo()

template<class Derived , typename EdgeT = double>
void YODA::YAxisMixin< Derived, EdgeT >::rebinYTo ( const std::vector< double > &  newedges)
inline

Definition at line 145 of file BinnedUtils.h.

145 {
146 static_cast<Derived*>(this)->template rebinTo<1>(newedges);
147 }

◆ yEdges()

template<class Derived , typename EdgeT = double>
std::vector< EdgeT > YODA::YAxisMixin< Derived, EdgeT >::yEdges ( const bool  includeOverflows = false) const
inline

All bin edges on Y axis. +-inf edges are included.

Definition at line 128 of file BinnedUtils.h.

128 {
129 return static_cast<const Derived*>(this)->template edges<1>(includeOverflows);
130 }

◆ yMax()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
enable_if_CAxisT< T > YODA::YAxisMixin< Derived, EdgeT >::yMax ( ) const
inline

High edge of second histo's axis.

Definition at line 125 of file BinnedUtils.h.

125{ return static_cast<const Derived*>(this)->template max<1>(); }

◆ yMin()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
enable_if_CAxisT< T > YODA::YAxisMixin< Derived, EdgeT >::yMin ( ) const
inline

Low edge of second histo's axis.

Definition at line 121 of file BinnedUtils.h.

121{ return static_cast<const Derived*>(this)->template min<1>(); }

◆ yWidths()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > YODA::YAxisMixin< Derived, EdgeT >::yWidths ( const bool  includeOverflows = false) const
inline

All widths on Y axis.

Note
Only supported for continuous axes

Definition at line 137 of file BinnedUtils.h.

137 {
138 return static_cast<const Derived*>(this)->template widths<1>(includeOverflows);
139 }

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