![]() |
![]() |
#include <CombinatoricGenerator.h>
Public Types | |
typedef std::auto_ptr < CombinatoricIterator< T > > | CombIterPtr |
typedef iterator::value_type::ValueIter | combo_iterator |
typedef CombinatoricIterator< T > | iterator |
Public Member Functions | |
CombinatoricIterator< T > | begin () |
CombinatoricGenerator (const value_iter &begin, const value_iter &end, size_t choose) | |
CombinatoricIterator< T > | end () |
Private Types | |
typedef indices_collection::iterator | index_iter |
typedef size_t | index_type |
typedef std::vector< index_type > | indices_collection |
typedef std::set< index_type > | indices_set |
typedef T::const_iterator | value_iter |
typedef T::value_type | value_type |
Private Attributes | |
CombIterPtr | beginning_ |
CombIterPtr | ending_ |
Definition at line 238 of file CombinatoricGenerator.h.
typedef std::auto_ptr<CombinatoricIterator<T> > reco::tau::CombinatoricGenerator< T >::CombIterPtr |
Definition at line 259 of file CombinatoricGenerator.h.
typedef iterator::value_type::ValueIter reco::tau::CombinatoricGenerator< T >::combo_iterator |
Definition at line 261 of file CombinatoricGenerator.h.
typedef indices_collection::iterator reco::tau::CombinatoricGenerator< T >::index_iter [private] |
Definition at line 254 of file CombinatoricGenerator.h.
typedef size_t reco::tau::CombinatoricGenerator< T >::index_type [private] |
Definition at line 252 of file CombinatoricGenerator.h.
typedef std::vector<index_type> reco::tau::CombinatoricGenerator< T >::indices_collection [private] |
Definition at line 253 of file CombinatoricGenerator.h.
typedef std::set<index_type> reco::tau::CombinatoricGenerator< T >::indices_set [private] |
Definition at line 255 of file CombinatoricGenerator.h.
typedef CombinatoricIterator<T> reco::tau::CombinatoricGenerator< T >::iterator |
Definition at line 260 of file CombinatoricGenerator.h.
typedef T::const_iterator reco::tau::CombinatoricGenerator< T >::value_iter [private] |
Definition at line 250 of file CombinatoricGenerator.h.
typedef T::value_type reco::tau::CombinatoricGenerator< T >::value_type [private] |
Definition at line 251 of file CombinatoricGenerator.h.
reco::tau::CombinatoricGenerator< T >::CombinatoricGenerator | ( | const value_iter & | begin, |
const value_iter & | end, | ||
size_t | choose | ||
) | [inline, explicit] |
Definition at line 263 of file CombinatoricGenerator.h.
References reco::tau::CombinatoricGenerator< T >::begin(), reco::tau::CombinatoricGenerator< T >::beginning_, reco::tau::CombinatoricGenerator< T >::ending_, and i.
{ // Make beginning and ending index collections indices_collection initialCombo(choose); indices_collection finalCombo(choose); size_t totalElements = end-begin; indices_collection allIndices(totalElements); for(size_t i=0; i < totalElements; ++i) { allIndices[i] = i; } for(size_t i=0; i < choose; ++i) { initialCombo[i] = i; // End conditions each is set at nElements finalCombo[i] = totalElements; } beginning_ = CombIterPtr(new CombinatoricIterator<T>(Combinatoric<T>( begin, allIndices, initialCombo, false))); ending_ = CombIterPtr(new CombinatoricIterator<T>(Combinatoric<T>( begin, allIndices, finalCombo, true))); }
CombinatoricIterator<T> reco::tau::CombinatoricGenerator< T >::begin | ( | void | ) | [inline] |
Definition at line 291 of file CombinatoricGenerator.h.
References reco::tau::CombinatoricGenerator< T >::beginning_.
Referenced by reco::tau::CombinatoricGenerator< T >::CombinatoricGenerator().
{ return *beginning_; }
CombinatoricIterator<T> reco::tau::CombinatoricGenerator< T >::end | ( | void | ) | [inline] |
Definition at line 295 of file CombinatoricGenerator.h.
References reco::tau::CombinatoricGenerator< T >::ending_.
{ return *ending_; }
CombIterPtr reco::tau::CombinatoricGenerator< T >::beginning_ [private] |
Definition at line 300 of file CombinatoricGenerator.h.
Referenced by reco::tau::CombinatoricGenerator< T >::begin(), and reco::tau::CombinatoricGenerator< T >::CombinatoricGenerator().
CombIterPtr reco::tau::CombinatoricGenerator< T >::ending_ [private] |
Definition at line 301 of file CombinatoricGenerator.h.
Referenced by reco::tau::CombinatoricGenerator< T >::CombinatoricGenerator(), and reco::tau::CombinatoricGenerator< T >::end().