yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::BinsVecWrapper< VecT > Class Template Reference

Vector wrapper used to interact with bins vectors. Able to hide overflow and hidden bins. More...

#include <BinnedStorage.h>

Classes

class  myIt
 

Public Types

using BinType = std::decay_t< decltype(*std::declval< VecT >().begin())>
 

Public Member Functions

 BinsVecWrapper ()=delete
 
 BinsVecWrapper (VecT &bins, const std::vector< size_t > &hiddenBins)
 HiddenBins std::vector<size_t> must be sorted.
 
 BinsVecWrapper (BinsVecWrapper &&other)
 
myIt begin () const
 
myIt end () const
 
size_t size () const
 
const BinTypeoperator[] (size_t index) const
 
BinTypeoperator[] (size_t index)
 

Detailed Description

template<class VecT>
class YODA::BinsVecWrapper< VecT >

Vector wrapper used to interact with bins vectors. Able to hide overflow and hidden bins.

Definition at line 21 of file BinnedStorage.h.

Member Typedef Documentation

◆ BinType

template<class VecT >
using YODA::BinsVecWrapper< VecT >::BinType = std::decay_t<decltype(*std::declval<VecT>().begin())>

Definition at line 26 of file BinnedStorage.h.

Constructor & Destructor Documentation

◆ BinsVecWrapper() [1/3]

template<class VecT >
YODA::BinsVecWrapper< VecT >::BinsVecWrapper ( )
delete

◆ BinsVecWrapper() [2/3]

template<class VecT >
YODA::BinsVecWrapper< VecT >::BinsVecWrapper ( VecT &  bins,
const std::vector< size_t > &  hiddenBins 
)
inline

HiddenBins std::vector<size_t> must be sorted.

Definition at line 30 of file BinnedStorage.h.

31 : _bins(bins), _hiddenBins(hiddenBins) {}

◆ BinsVecWrapper() [3/3]

template<class VecT >
YODA::BinsVecWrapper< VecT >::BinsVecWrapper ( BinsVecWrapper< VecT > &&  other)
inline

Definition at line 33 of file BinnedStorage.h.

34 : _bins(std::move(other._bins)), _hiddenBins(std::move(other._hiddenBins)) {}

Member Function Documentation

◆ begin()

template<class VecT >
myIt YODA::BinsVecWrapper< VecT >::begin ( ) const
inline

Definition at line 36 of file BinnedStorage.h.

36{ return myIt(_bins, _hiddenBins); }

◆ end()

template<class VecT >
myIt YODA::BinsVecWrapper< VecT >::end ( ) const
inline

Definition at line 37 of file BinnedStorage.h.

37{ return myIt(_bins); }

◆ operator[]() [1/2]

template<class VecT >
BinType & YODA::BinsVecWrapper< VecT >::operator[] ( size_t  index)
inline

Definition at line 43 of file BinnedStorage.h.

43{ return _bins[index]; }

◆ operator[]() [2/2]

template<class VecT >
const BinType & YODA::BinsVecWrapper< VecT >::operator[] ( size_t  index) const
inline

Definition at line 41 of file BinnedStorage.h.

41{ return _bins[index]; }

◆ size()

template<class VecT >
size_t YODA::BinsVecWrapper< VecT >::size ( ) const
inline

Definition at line 39 of file BinnedStorage.h.

39{ return _bins.size() - _hiddenBins.size(); }

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