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

generic Bin version that derives from BinBase More...

#include <Bin.h>

Inheritance diagram for YODA::Bin< N, T, BinningT >:
YODA::BinBase< T, BinningT >

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.
 

Protected Types

using BaseT = BinBase< T, BinningT >
 
- 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<size_t N, typename T, typename BinningT>
class YODA::Bin< N, T, BinningT >

generic Bin version that derives from BinBase

Definition at line 265 of file Bin.h.

Member Typedef Documentation

◆ BaseT [1/2]

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

Definition at line 269 of file Bin.h.

◆ BaseT [2/2]

template<size_t N, 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<size_t N, typename T , typename BinningT >
YODA::Bin< N, T, BinningT >::Bin ( )
delete

Member Function Documentation

◆ operator=() [1/4]

template<size_t N, 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<size_t N, 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<size_t N, 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<size_t N, 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: