yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.0
YODA::Bin< 2, T, BinningT > Class Template Reference

CRTP specialisation in 2D. More...

#include <Bin.h>

Inheritance diagram for YODA::Bin< 2, T, BinningT >:
YODA::BinBase< T, BinningT > YODA::XBinMixin< Bin< 2, T, BinningT >, BinningT::template getEdgeT< 0 > > YODA::YBinMixin< Bin< 2, T, BinningT >, BinningT::template getEdgeT< 1 > >

Public Types

using BaseT = std::conditional_t< isArithmetic::value, ArithmeticWrapper< T >, T >
 

Public Member Functions

 Bin ()=delete
 
double dArea () const noexcept
 Differential area of this bin (i.e. product of bin widths)
 
BinBaseoperator= (BaseT &&rhs) noexcept
 Assignment operator of an rvalue content type.
 
BinBaseoperator= (const BaseT &rhs) noexcept
 Assignment operator of a content type.
 
BinBaseoperator= (const BinBase &rhs) noexcept
 Copy assignment operator.
 
BinBaseoperator= (BinBase &&rhs) noexcept
 Move assignment operator.
 
- Public Member Functions inherited from YODA::BinBase< T, BinningT >
 BinBase ()=delete
 
 BinBase (const BinBase &rhs)=default
 
 BinBase (BinBase &&rhs)=default
 
 BinBase (size_t binIndex, const BinningT &binning)
 
 BinBase (const T &storedVal, size_t binIndex, const BinningT &binning)
 Setting constructor.
 
 BinBase (T &&storedVal, size_t binIndex, const BinningT &binning)
 
 BinBase (const BinBase &other, const BinningT &binning)
 
BinBaseoperator= (BaseT &&rhs) noexcept
 Assignment operator of an rvalue content type.
 
BinBaseoperator= (const BaseT &rhs) noexcept
 Assignment operator of a content type.
 
BinBaseoperator= (const BinBase &rhs) noexcept
 Copy assignment operator.
 
BinBaseoperator= (BinBase &&rhs) noexcept
 Move assignment operator.
 
const T & raw () const noexcept
 return stored content
 
size_t index () const noexcept
 return stored index
 
bool isMasked () const noexcept
 
bool isVisible () const noexcept
 
double dVol () const noexcept
 Differential volume of this bin (i.e. product of bin widths)
 
template<size_t dimNum>
enable_if_CAxisT< axisEdgeT< dimNum > > width () const noexcept
 Width of this bin along a specific axis.
 
template<size_t dimNum>
enable_if_CAxisT< axisEdgeT< dimNum > > max () const noexcept
 Maximum of this bin interval.
 
template<size_t dimNum>
enable_if_CAxisT< axisEdgeT< dimNum > > min () const noexcept
 Minimum of this bin interval.
 
template<size_t dimNum>
enable_if_CAxisT< axisEdgeT< dimNum > > mid () const noexcept
 Middle of this bin interval.
 
template<size_t dimNum>
enable_if_DAxisT< axisEdgeT< dimNum > > edge () const noexcept
 Edge of this bin.
 
- Public Member Functions inherited from YODA::XBinMixin< Bin< 2, T, BinningT >, BinningT::template getEdgeT< 0 > >
enable_if_CAxisT< T > xMax () const noexcept
 Upper bin edge along X axis.
 
enable_if_CAxisT< T > xMin () const noexcept
 Lower bin edge along X axis.
 
enable_if_CAxisT< T > xMid () const noexcept
 Bin centre along X axis.
 
enable_if_CAxisT< T > xWidth () const noexcept
 Bin width along X axis.
 
enable_if_DAxisT< T > xEdge () const noexcept
 Bin edge along X axis.
 
- Public Member Functions inherited from YODA::YBinMixin< Bin< 2, T, BinningT >, BinningT::template getEdgeT< 1 > >
enable_if_CAxisT< T > yMax () const noexcept
 Upper bin edge along Y axis.
 
enable_if_CAxisT< T > yMin () const noexcept
 Lower bin edge along Y axis.
 
enable_if_CAxisT< T > yMid () const noexcept
 Bin centre along Y axis.
 
enable_if_CAxisT< T > yWidth () const noexcept
 Bin width along Y axis.
 
enable_if_DAxisT< T > yEdge () const noexcept
 Bin edge along Y axis.
 

Protected Types

using BaseT = BinBase< T, BinningT >
 
template<size_t axisNum>
using axisEdgeT = typename BinningT::template getAxisT< axisNum >::EdgeT
 
- Protected Types inherited from YODA::BinBase< T, BinningT >
using isArithmetic = std::conditional_t< std::is_arithmetic< T >::value, std::true_type, std::false_type >
 
using BaseT = std::conditional_t< isArithmetic::value, ArithmeticWrapper< T >, T >
 
template<size_t axisNum>
using axisEdgeT = typename BinningT::template getAxisT< axisNum >::EdgeT
 

Detailed Description

template<typename T, typename BinningT>
class YODA::Bin< 2, T, BinningT >

CRTP specialisation in 2D.

Definition at line 353 of file Bin.h.

Member Typedef Documentation

◆ axisEdgeT

template<typename T , typename BinningT >
template<size_t axisNum>
using YODA::Bin< 2, T, BinningT >::axisEdgeT = typename BinningT::template getAxisT<axisNum>::EdgeT
protected

Definition at line 365 of file Bin.h.

◆ BaseT [1/2]

template<typename T , typename BinningT >
using YODA::Bin< 2, T, BinningT >::BaseT = BinBase<T, BinningT>
protected

Definition at line 362 of file Bin.h.

◆ BaseT [2/2]

template<typename T , typename BinningT >
using YODA::BinBase< T, BinningT >::BaseT = std::conditional_t<isArithmetic::value, ArithmeticWrapper<T>, T>

Definition at line 89 of file Bin.h.

Constructor & Destructor Documentation

◆ Bin()

template<typename T , typename BinningT >
YODA::Bin< 2, T, BinningT >::Bin ( )
delete

Member Function Documentation

◆ dArea()

template<typename T , typename BinningT >
double YODA::Bin< 2, T, BinningT >::dArea ( ) const
inlinenoexcept

Differential area of this bin (i.e. product of bin widths)

Definition at line 377 of file Bin.h.

377{ return BaseT::dVol(); }
double dVol() const noexcept
Differential volume of this bin (i.e. product of bin widths)
Definition Bin.h:191

References YODA::BinBase< T, BinningT >::dVol().

◆ operator=() [1/4]

template<typename T , typename BinningT >
BinBase & YODA::BinBase< T, BinningT >::operator= ( BaseT &&  rhs)
inlinenoexcept

Assignment operator of an rvalue content type.

Note
Cython is not a fan of perfect forwarding yet

Definition at line 128 of file Bin.h.

128 {
129 //BaseT::operator=(std::forward<BaseT>(rhs));
130 BaseT::operator=(std::move(rhs));
131 return *this;
132 }
BinBase & operator=(BaseT &&rhs) noexcept
Assignment operator of an rvalue content type.
Definition Bin.h:128

◆ operator=() [2/4]

template<typename T , typename BinningT >
BinBase & YODA::BinBase< T, BinningT >::operator= ( BinBase &&  rhs)
inlinenoexcept

Move assignment operator.

Note
_binIdx is not altered to keep correct indices while using std::vector<...>().erase() on _bins (bins storage).

Definition at line 155 of file Bin.h.

155 {
156 if (this != &rhs) {
157 BaseT::operator=(std::move(rhs));
158 }
159 return *this;
160 }

◆ operator=() [3/4]

template<typename T , typename BinningT >
BinBase & YODA::BinBase< T, BinningT >::operator= ( const BaseT rhs)
inlinenoexcept

Assignment operator of a content type.

Definition at line 135 of file Bin.h.

135 {
136 BaseT::operator=(rhs);
137 return *this;
138 }

◆ operator=() [4/4]

template<typename T , typename BinningT >
BinBase & YODA::BinBase< T, BinningT >::operator= ( const BinBase rhs)
inlinenoexcept

Copy assignment operator.

Note
_binIdx is not altered to keep correct indices while using std::vector<...>().erase() on _bins (bins storage).

Definition at line 144 of file Bin.h.

144 {
145 if (this != &rhs) {
146 BaseT::operator=(rhs);
147 }
148 return *this;
149 }

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