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

#include <BinnedStorage.h>

Public Member Functions

 myIt (VecT &bins, const std::vector< size_t > &hiddenBins)
 
 myIt (VecT &bins)
 
myIt operator++ () noexcept
 
bool operator!= (const myIt &other) const noexcept
 
std::iterator_traits< IterT >::reference operator* () noexcept
 

Detailed Description

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

Definition at line 52 of file BinnedStorage.h.

Constructor & Destructor Documentation

◆ myIt() [1/2]

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

Reveal next hidden bin.

Advance iterator manually

Definition at line 59 of file BinnedStorage.h.

61 : _ptr(bins.begin()),
62 hiddenCurrPtr(hiddenBins.begin()),
63 hiddenEndPtr(hiddenBins.end()),
64 binsEndPtr(bins.end()) {
65
66 if (hiddenCurrPtr != hiddenEndPtr && 0 == *hiddenCurrPtr){
67
68 ++hiddenCurrPtr;
69 ++(*this);
70
71 }
72 }

◆ myIt() [2/2]

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

Definition at line 74 of file BinnedStorage.h.

75 : _ptr(bins.end()),
76 //hiddenCurrPtr(std::vector<size_t>::const_iterator()),
77 //hiddenEndPtr(std::vector<size_t>::const_iterator()),
78 binsEndPtr(bins.end()) {}

Member Function Documentation

◆ operator!=()

template<class VecT >
bool YODA::BinsVecWrapper< VecT >::myIt::operator!= ( const myIt other) const
inlinenoexcept

Definition at line 97 of file BinnedStorage.h.

97 {
98 return _ptr != other._ptr;
99 }

◆ operator*()

template<class VecT >
std::iterator_traits< IterT >::reference YODA::BinsVecWrapper< VecT >::myIt::operator* ( )
inlinenoexcept

Definition at line 101 of file BinnedStorage.h.

101{ return *_ptr; }

◆ operator++()

template<class VecT >
myIt YODA::BinsVecWrapper< VecT >::myIt::operator++ ( )
inlinenoexcept

Increment iterator. If iterator points on hidden element, skip until non hidden element or end of the vector.

Definition at line 80 of file BinnedStorage.h.

80 {
83 ++_ptr;
84 ++currBinIdx;
85
86 while (_ptr != binsEndPtr &&
87 hiddenCurrPtr != hiddenEndPtr &&
88 currBinIdx == *hiddenCurrPtr) {
89
90 ++currBinIdx;
91 ++hiddenCurrPtr;
92 ++_ptr;
93 }
94 return *this;
95 }

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