#include <ChargedVisibleList.h>
Inheritance diagram for dchain::ChargedVisibleList< Charged, CandidateClass >:
Public Types | |
typedef WholeItr< Charged > | const_iterator |
typedef WholeItr< Charged > | const_iterator |
typedef PartialItr< Charged > | const_partial_iterator |
typedef PartialItr< Charged > | const_partial_iterator |
typedef MuteWholeItr< Charged > | iterator |
typedef MuteWholeItr< Charged > | iterator |
typedef ChargedVisibleList< Charged, CandidateClass > | self_type |
typedef ChargedVisibleList< Charged, CandidateClass > | self_type |
typedef Charged | value_type |
typedef Charged | value_type |
Public Member Functions | |
template<class THolder, class TSelect> | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
template<class THolder, class TSelect> | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
virtual const_iterator | begin () const |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | begin () |
template<class WitnessIterator, class TSelector> | |
ChargedVisibleList (WitnessIterator first, WitnessIterator last, const TSelector &aFunctionalObject) | |
template<class WitnessIterator> | |
ChargedVisibleList (WitnessIterator first, WitnessIterator last) | |
template<class TSelector> | |
ChargedVisibleList (const self_type &aOtherList, const TSelector &aSel) | |
ChargedVisibleList (const self_type &aOtherList) | |
ChargedVisibleList () | |
template<class WitnessIterator, class TSelector> | |
ChargedVisibleList (WitnessIterator first, WitnessIterator last, const TSelector &aFunctionalObject) | |
template<class WitnessIterator> | |
ChargedVisibleList (WitnessIterator first, WitnessIterator last) | |
template<class TSelector> | |
ChargedVisibleList (const self_type &aOtherList, const TSelector &aSel) | |
ChargedVisibleList (const self_type &aOtherList) | |
ChargedVisibleList () | |
virtual bool | empty () const |
virtual bool | empty () const |
virtual const_iterator | end () const |
virtual iterator | end () |
virtual const_iterator | end () const |
virtual iterator | end () |
void | erase () |
void | erase () |
void | eraseContents () |
void | eraseContents () |
template<class Iterator, class TMaker, class TSelector> | |
void | fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< Charged >()) |
template<class TMaker, class TSelector> | |
void | fill (const LabeledParticleList< Charged, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel) |
template<class Iterator, class TMaker, class TSelector> | |
void | fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< Charged >()) |
template<class TMaker, class TSelector> | |
void | fill (const LabeledParticleList< Charged, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel) |
template<class THolder> | |
void | insert (THolder &pPossible) |
template<class THolder> | |
void | insert (THolder &pPossible) |
template<class TAnalyzer> | |
void | iterate (const TAnalyzer &analyze) const |
template<class TAnalyze> | |
void | iterate (TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (const TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (const TAnalyze &analyze) const |
ChosenChargeList< Charged, CandidateClass > & | minus () const |
ChosenChargeList< Charged, CandidateClass > & | minus () const |
template<class Witness> | |
const self_type & | operator= (const Witness &aWitnessList) |
const self_type & | operator= (const self_type &aOtherList) |
template<class Witness> | |
const self_type & | operator= (const Witness &aWitnessList) |
const self_type & | operator= (const self_type &aOtherList) |
template<class TSelector> | |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
template<class TSelector> | |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
const_iterator | particle_begin () const |
iterator | particle_begin () |
const_iterator | particle_begin () const |
iterator | particle_begin () |
const_iterator | particle_end () const |
iterator | particle_end () |
const_iterator | particle_end () const |
iterator | particle_end () |
ChosenChargeList< Charged, CandidateClass > & | plus () const |
ChosenChargeList< Charged, CandidateClass > & | plus () const |
template<class TSelect> | |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
template<class TSelect> | |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
virtual int | size () const |
virtual int | size () const |
virtual | ~ChargedVisibleList () |
virtual | ~ChargedVisibleList () |
Protected Member Functions | |
virtual const LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () const |
virtual LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () |
virtual const LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () const |
virtual LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () |
Private Attributes | |
MutableReferenceHolder< LabeledParticleList< Charged, CandidateClass > > | m_list |
MutableReferenceHolder< LabeledParticleList< Charged, CandidateClass > > | m_list |
ChosenChargeList< Charged, CandidateClass > * | m_minusList |
ChosenChargeList< Charged, CandidateClass > * | m_minusList |
ChosenChargeList< Charged, CandidateClass > * | m_plusList |
ChosenChargeList< Charged, CandidateClass > * | m_plusList |
Static Private Attributes | |
const conjugation::Label | kMinus = conjugation::kTails |
const conjugation::Label | kPlus = conjugation::kHeads |
|
|
|
|
|
|
|
|
|
|
|
|
|
inserts into the list only if the the selector returns true 00119 : 00120 m_list( (new LabeledParticleList< Charged , CandidateClass >) ), 00121 m_plusList(0), 00122 m_minusList(0) 00123 { 00124 } template < class Charged , class CandidateClass >
|
|
|
|
00159 : 00160 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00161 m_plusList(0), 00162 m_minusList(0) 00163 { 00164 fill(*(aOtherList.m_list), 00165 typename MakerTrait<Charged>::maker_type(), 00166 aSel); 00167 }
|
|
00170 : 00171 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00172 m_plusList(0), 00173 m_minusList(0) 00174 { 00175 fill(first, last, typename MakerTrait<Charged>::maker_type() ); }
|
|
00179 : 00180 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00181 m_plusList(0), 00182 m_minusList(0) 00183 { 00184 fill(first, last, 00185 typename MakerTrait<Charged>::maker_type(), aFunctionalObject); }
|
|
00138 { 00139 delete m_plusList; 00140 delete m_minusList; 00141 }
|
|
inserts into the list only if the the selector returns true |
|
|
|
00159 : 00160 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00161 m_plusList(0), 00162 m_minusList(0) 00163 { 00164 fill(*(aOtherList.m_list), 00165 typename MakerTrait<Charged>::maker_type(), 00166 aSel); 00167 }
|
|
00170 : 00171 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00172 m_plusList(0), 00173 m_minusList(0) 00174 { 00175 fill(first, last, typename MakerTrait<Charged>::maker_type() ); }
|
|
00179 : 00180 m_list( new LabeledParticleList<Charged,CandidateClass> ), 00181 m_plusList(0), 00182 m_minusList(0) 00183 { 00184 fill(first, last, 00185 typename MakerTrait<Charged>::maker_type(), aFunctionalObject); }
|
|
|
|
00244 { 00245 //std::cout << " @ ChargedVisibleList::attempt_insert() " << __LINE__ << std::endl; 00246 bool returnValue = (aSelect)(*pPossible); 00247 if (returnValue) { 00248 this->insert(pPossible); 00249 } 00250 return returnValue; 00251 }
|
|
00244 { 00245 //std::cout << " @ ChargedVisibleList::attempt_insert() " << __LINE__ << std::endl; 00246 bool returnValue = (aSelect)(*pPossible); 00247 if (returnValue) { 00248 this->insert(pPossible); 00249 } 00250 return returnValue; 00251 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00152 { 00153 // do this casting to make sure const 'begin' function is called 00154 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->begin() ); 00155 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00116 { 00117 return ( labeledCandidateList().begin() ) ; 00118 }
|
|
|
|
00136 { 00137 return ( labeledCandidateList().empty() ) ; 00138 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00161 { 00162 // do this casting to make sure const 'end' function is called 00163 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->end() ); 00164 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00124 { 00125 return ( labeledCandidateList().end() ) ; 00126 }
|
|
00266 { 00267 eraseContents(); 00268 }
|
|
00266 { 00267 eraseContents(); 00268 }
|
|
|
|
|
|
00288 { 00289 //std::cout << " @ ChargedVisibleList::fill() " << __LINE__ << std::endl; 00290 //std::cout << "size before transform: " << m_list->size() << std::endl; 00291 std::transform(first,last, 00292 selectiveInserter(aSel), 00293 aMaker); 00294 //std::cout << "size after transform: " << m_list->size() << std::endl; 00295 }
|
|
00273 { 00274 00275 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00276 //NOTE: even though this is really just calling the copy constructor 00277 //it is best to use the maker since it allows further control 00278 const Charged& from((*entry)()); 00279 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00280 00281 attempt_insert(localCopy,aSel); 00282 } 00283 00284 }
|
|
00288 { 00289 //std::cout << " @ ChargedVisibleList::fill() " << __LINE__ << std::endl; 00290 //std::cout << "size before transform: " << m_list->size() << std::endl; 00291 std::transform(first,last, 00292 selectiveInserter(aSel), 00293 aMaker); 00294 //std::cout << "size after transform: " << m_list->size() << std::endl; 00295 }
|
|
00273 { 00274 00275 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00276 //NOTE: even though this is really just calling the copy constructor 00277 //it is best to use the maker since it allows further control 00278 const Charged& from((*entry)()); 00279 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00280 00281 attempt_insert(localCopy,aSel); 00282 } 00283 00284 }
|
|
00254 { 00255 if (0 < charge_sign(pPossible)) { 00256 m_list->push_back( LabeledParticle< Charged >( pPossible , 00257 kPlus ) ) ; 00258 } 00259 else { 00260 m_list->push_back( LabeledParticle< Charged >( pPossible , 00261 kMinus ) ) ; 00262 } 00263 }
|
|
00254 { 00255 if (0 < charge_sign(pPossible)) { 00256 m_list->push_back( LabeledParticle< Charged >( pPossible , 00257 kPlus ) ) ; 00258 } 00259 else { 00260 m_list->push_back( LabeledParticle< Charged >( pPossible , 00261 kMinus ) ) ; 00262 } 00263 }
|
|
Reimplemented in dchain::ChosenChargeList< Charged, CandidateClass >, dchain::ChosenConjugateList< Conjugate, CandidateClass >, dchain::ChosenChargeList< Charged, CandidateClass >, dchain::ChosenConjugateList< Conjugate, CandidateClass >, dchain::ChosenChargeList< Charged, Charged::CandidateClass >, dchain::ChosenChargeList< Charged, Charged::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, NeutralNC::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, NeutralNC::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, CandidateClass >, and dchain::ChosenConjugateList< NeutralNC, CandidateClass >. 00102 { 00103 const_iterator finished ( end() ); 00104 for ( const_iterator entry ( begin() ) ; 00105 entry != finished ; 00106 ++entry ) { 00107 analyze( (*entry)() ) ; 00108 } 00109 }
|
|
00228 { 00229 const_iterator finished ( particle_end() ) ; 00230 for ( const_iterator entry ( particle_begin() ) ; 00231 entry != finished ; 00232 ++entry ) { 00233 analyze( (*entry)() ) ; 00234 } 00235 }
|
|
00218 { 00219 const_iterator finished ( particle_end() ) ; 00220 for ( const_iterator entry ( particle_begin() ) ; 00221 entry != finished ; 00222 ++entry ) { 00223 analyze( (*entry)() ) ; 00224 } 00225 }
|
|
00228 { 00229 const_iterator finished ( particle_end() ) ; 00230 for ( const_iterator entry ( particle_begin() ) ; 00231 entry != finished ; 00232 ++entry ) { 00233 analyze( (*entry)() ) ; 00234 } 00235 }
|
|
00218 { 00219 const_iterator finished ( particle_end() ) ; 00220 for ( const_iterator entry ( particle_begin() ) ; 00221 entry != finished ; 00222 ++entry ) { 00223 analyze( (*entry)() ) ; 00224 } 00225 }
|
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. 00231 {
00232 return ( *m_list ) ;
00233 }
|
|
Implements dchain::CandidateList< CandidateClass >. 00197 {
00198 return ( *m_list ) ;
00199 }
|
|
|
|
00187 { 00188 if ( m_minusList == 0 ) { 00189 m_minusList = new ChosenChargeList< Charged , CandidateClass >( *m_list , kMinus ); 00190 } 00191 return (*m_minusList); 00192 }
|
|
Reimplemented in DCFillableChargedList< Charged >, and DCFillableChargedList< Charged >. 00192 { 00193 eraseContents(); 00194 fill(aWitnessList.begin(), aWitnessList.end(), 00195 typename MakerTrait<Charged>::maker_type(), 00196 SelectAll<Charged>() ); 00197 return ( *this ) ; 00198 }
|
|
|
|
Reimplemented in DCFillableChargedList< Charged >, and DCFillableChargedList< Charged >. 00192 { 00193 eraseContents(); 00194 fill(aWitnessList.begin(), aWitnessList.end(), 00195 typename MakerTrait<Charged>::maker_type(), 00196 SelectAll<Charged>() ); 00197 return ( *this ) ; 00198 }
|
|
|
|
00202 { 00203 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00204 }
|
|
00202 { 00203 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00204 }
|
|
|
|
|
|
00215 { 00216 // Need to cast to 'const' to get the right function call 00217 return ( (*(const LabeledParticleList< Charged , CandidateClass >*)(m_list.pointer())).begin() ) ; 00218 }
|
|
00163 { 00164 return ( m_list->begin() ) ; 00165 }
|
|
|
|
|
|
00222 { 00223 // Need to cast to 'const' to get the right function call 00224 return ( (*(const LabeledParticleList< Charged , CandidateClass >*)(m_list.pointer())).end() ) ; 00225 }
|
|
00170 { 00171 return ( m_list->end() ) ; 00172 }
|
|
|
|
00177 { 00178 if ( m_plusList == 0 ) { 00179 m_plusList = new ChosenChargeList< Charged, CandidateClass >( *m_list, kPlus ); 00180 } 00181 return (*m_plusList); 00182 }
|
|
creates an insert iterator that filters based on iSelect
00239 { 00240 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
creates an insert iterator that filters based on iSelect
00239 { 00240 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
|
|
00144 { 00145 return ( labeledCandidateList().size() ) ; 00146 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|