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

CRTP specialisation in 3D. More...

#include <Bin.h>

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

Public Types

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

Public Member Functions

 Bin ()=delete
 
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< 3, 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< 3, 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.
 
- Public Member Functions inherited from YODA::ZBinMixin< Bin< 3, T, BinningT >, BinningT::template getEdgeT< 2 > >
enable_if_CAxisT< T > zMax () const noexcept
 Upper bin edge along Z axis.
 
enable_if_CAxisT< T > zMin () const noexcept
 Lower bin edge along Z axis.
 
enable_if_CAxisT< T > zMid () const noexcept
 Bin centre along Z axis.
 
enable_if_CAxisT< T > zWidth () const noexcept
 Bin width along Z axis.
 
enable_if_DAxisT< T > zEdge () const noexcept
 Bin edge along Z 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< 3, T, BinningT >

CRTP specialisation in 3D.

Definition at line 384 of file Bin.h.

Member Typedef Documentation

◆ axisEdgeT

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

Definition at line 398 of file Bin.h.

◆ BaseT [1/2]

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

Definition at line 395 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< 3, T, BinningT >::Bin ( )
delete

Member Function Documentation

◆ 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: