#include <DCFillableNeutralList.h>
Inheritance diagram for DCFillableNeutralList< Neutral >:
Public Types | |
typedef Neutral | value_type |
typedef dchain::MuteWholeItr< Neutral > | iterator |
typedef dchain::WholeItr< Neutral > | const_iterator |
typedef NeutralVisibleList< Neutral, Neutral::CandidateClass > | self_type |
typedef dchain::PartialCandidateItr< Neutral::CandidateClass > | const_partial_iterator |
Public Member Functions | |
DCFillableNeutralList (bool(*pFunction)(Neutral &)=0) | |
template<class WitnessIterator> | |
DCFillableNeutralList (WitnessIterator first, WitnessIterator last, bool(*pFunction)(Neutral &)=0) | |
template<class WitnessIterator> | |
DCFillableNeutralList (WitnessIterator first, WitnessIterator last, DCSelectionFunction< Neutral > &aFunctionalObject) | |
DCFillableNeutralList (const DCFillableNeutralList< Neutral > &aOtherList, bool(*pFunction)(Neutral &)=0) | |
DCFillableNeutralList (DCSelectionFunction< Neutral > &aFunctionalObject) | |
DCFillableNeutralList (const DCFillableNeutralList< Neutral > &aOtherList, DCSelectionFunction< Neutral > &aFunctionalObject) | |
DCFillableNeutralList (const std::vector< Neutral > &aVector) | |
virtual | ~DCFillableNeutralList () |
const DCFillableNeutralList< Neutral > & | operator= (const DCFillableNeutralList< Neutral > &aOtherList) |
template<class WitnessIterator> | |
void | fill (WitnessIterator first, WitnessIterator last) |
template<class Witness> | |
const DCFillableNeutralList< Neutral > & | operator= (const Witness &aWitnessList) |
void | fill (const LabeledParticleList< Neutral, Neutral::CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel) |
void | fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< Neutral >()) |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
iterator | particle_begin () |
const_iterator | particle_begin () const |
iterator | particle_end () |
const_iterator | particle_end () const |
void | iterate (const TAnalyze &analyze) const |
void | iterate (TAnalyze &analyze) const |
void | iterate (const TAnalyzer &analyze) const |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
void | insert (THolder &pPossible) |
void | eraseContents () |
void | erase () |
virtual bool | isSelfConjugate () const |
bool | isConjugateOf (const ConjugateList< Neutral::CandidateClass > &aList) const |
int | partial_size () const |
virtual const_partial_iterator | partial_begin () const |
virtual const_partial_iterator | partial_end () const |
void | conjugation_iterate (const TAnalyzer &analyzer) const |
void | partial_iterate (const TAnalyzer &analyze) const |
const_partial_iterator | conjugate_partial_begin () const |
const_partial_iterator | conjugate_partial_end () const |
virtual conjugation::Label | label () const |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | end () |
virtual const_iterator | end () const |
virtual bool | empty () const |
virtual int | size () const |
Protected Member Functions | |
void | fill (Iterator first, Iterator last) |
virtual dchain::LabeledParticleList< Neutral, Neutral::CandidateClass > & | labeledCandidateList () |
virtual const dchain::LabeledParticleList< Neutral, Neutral::CandidateClass > & | labeledCandidateList () const |
void | setLabel (const conjugation::Label aLabel) |
Private Member Functions | |
void | fill (const dchain::LabeledParticleList< Neutral, typename Neutral::CandidateClass > &aList) |
Definition at line 62 of file DCFillableNeutralList.h.
typedef dchain::WholeItr< Neutral > dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::const_iterator [inherited] |
Reimplemented from dchain::ConjugateList< Neutral::CandidateClass >.
Definition at line 107 of file NeutralVisibleList.h.
typedef dchain::PartialCandidateItr< Neutral::CandidateClass > dchain::ConjugateList< Neutral::CandidateClass >::const_partial_iterator [inherited] |
Reimplemented from dchain::CandidateList< Neutral::CandidateClass >.
Definition at line 97 of file ConjugateList.h.
typedef dchain::MuteWholeItr< Neutral > dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::iterator [inherited] |
Reimplemented from dchain::ConjugateList< Neutral::CandidateClass >.
Definition at line 106 of file NeutralVisibleList.h.
typedef NeutralVisibleList<Neutral ,Neutral::CandidateClass > dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::self_type [inherited] |
Definition at line 112 of file NeutralVisibleList.h.
typedef Neutral DCNeutralVisibleList< Neutral , Neutral::CandidateClass >::value_type [inherited] |
Reimplemented from dchain::NeutralVisibleList< Neutral, Neutral::CandidateClass >.
Definition at line 104 of file DCNeutralVisibleList.h.
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | bool(*)(Neutral &) | pFunction = 0 |
) |
Definition at line 66 of file DCFillableNeutralList.cc.
00066 : 00067 DCNeutralVisibleList< Neutral , typename Neutral::CandidateClass >( pFunction ) 00068 { 00069 }
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | WitnessIterator | first, | |
WitnessIterator | last, | |||
bool(*)(Neutral &) | pFunction = 0 | |||
) | [inline] |
Definition at line 74 of file DCFillableNeutralList.h.
References DCFillableNeutralList< Neutral >::fill().
00075 : 00076 DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(pFunction) { 00077 fill(first, last); } //DCFillableNeutralList( const TruthWitnesses& aTruthList ,
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | WitnessIterator | first, | |
WitnessIterator | last, | |||
DCSelectionFunction< Neutral > & | aFunctionalObject | |||
) | [inline] |
Definition at line 88 of file DCFillableNeutralList.h.
References DCFillableNeutralList< Neutral >::fill().
00089 : 00090 DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(aFunctionalObject) { 00091 fill(first, last); } DCFillableNeutralList( const DCFillableNeutralList< Neutral >& aOtherList ,
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | const DCFillableNeutralList< Neutral > & | aOtherList, | |
bool(*)(Neutral &) | pFunction = 0 | |||
) |
Definition at line 97 of file DCFillableNeutralList.cc.
00098 : 00099 DCNeutralVisibleList< Neutral , 00100 typename Neutral::CandidateClass >( aOtherList , 00101 pFunction ) 00102 { 00103 }
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | DCSelectionFunction< Neutral > & | aFunctionalObject | ) |
Definition at line 109 of file DCFillableNeutralList.cc.
00109 : 00110 DCNeutralVisibleList< Neutral , 00111 typename Neutral::CandidateClass >( aFunctionalObject ) 00112 { 00113 }
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | const DCFillableNeutralList< Neutral > & | aOtherList, | |
DCSelectionFunction< Neutral > & | aFunctionalObject | |||
) |
Definition at line 141 of file DCFillableNeutralList.cc.
00142 : 00143 DCNeutralVisibleList< Neutral , 00144 typename Neutral::CandidateClass >( aOtherList , 00145 aFunctionalObject ) 00146 { 00147 } /*
DCFillableNeutralList< Neutral >::DCFillableNeutralList | ( | const std::vector< Neutral > & | aVector | ) |
DCFillableNeutralList< Neutral >::~DCFillableNeutralList | ( | ) | [virtual] |
bool dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::attempt_insert | ( | THolder & | pPossible, | |
const TSelect & | aSelect | |||
) | [inline, inherited] |
Definition at line 195 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::insert().
00196 { 00197 bool returnValue = (aSelect)(*pPossible); 00198 if (returnValue) { 00199 this->insert(pPossible); 00200 } 00201 return returnValue; 00202 }
virtual const_iterator dchain::CandidateList< Neutral::CandidateClass >::begin | ( | void | ) | const [virtual, inherited] |
virtual iterator dchain::CandidateList< Neutral::CandidateClass >::begin | ( | void | ) | [virtual, inherited] |
const_partial_iterator dchain::ConjugateList< Neutral::CandidateClass >::conjugate_partial_begin | ( | ) | const [inherited] |
const_partial_iterator dchain::ConjugateList< Neutral::CandidateClass >::conjugate_partial_end | ( | ) | const [inherited] |
void dchain::ConjugateList< Neutral::CandidateClass >::conjugation_iterate | ( | const TAnalyzer & | analyzer | ) | const [inline, inherited] |
TAnalyzer takes two arguments 1) const CandidateClass& 2) a bool which is 'true' if the candiate matches the present conjugation
Definition at line 117 of file ConjugateList.h.
00118 { 00119 const_iterator finished ( this->end() ) ; 00120 for ( const_iterator entry ( this->begin() ) ; 00121 entry != finished ; 00122 ++entry ) { 00123 analyze( (*entry)() , (*entry).label() == m_label ) ; 00124 } 00125 }
virtual bool dchain::CandidateList< Neutral::CandidateClass >::empty | ( | ) | const [virtual, inherited] |
virtual const_iterator dchain::CandidateList< Neutral::CandidateClass >::end | ( | void | ) | const [virtual, inherited] |
virtual iterator dchain::CandidateList< Neutral::CandidateClass >::end | ( | void | ) | [virtual, inherited] |
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::erase | ( | ) | [inline, inherited] |
Definition at line 210 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::eraseContents().
00210 { 00211 eraseContents(); 00212 }
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::eraseContents | ( | ) | [inherited] |
Referenced by DCFillableNeutralList< Neutral >::operator=().
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::fill | ( | Iterator | first, | |
Iterator | last, | |||
const TMaker & | aMaker, | |||
const TSelector & | aSel = SelectAll<Neutral>() | |||
) | [inline, inherited] |
Definition at line 231 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::selectiveInserter().
00233 { 00234 std::transform(first,last, 00235 selectiveInserter(aSel), 00236 aMaker); 00237 }
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::fill | ( | const LabeledParticleList< Neutral , Neutral::CandidateClass > & | aList, | |
const TMaker & | aMaker, | |||
const TSelector & | aSel | |||
) | [inline, inherited] |
Definition at line 216 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::attempt_insert(), dchain::LabeledParticleList< ParticleClass, CandidateClass >::begin(), and dchain::LabeledParticleList< ParticleClass, CandidateClass >::end().
00218 { 00219 00220 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00221 //NOTE: even though this is really just calling the copy constructor 00222 //it is best to use the maker since it allows further control 00223 const Neutral& from((*entry)()); 00224 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00225 00226 attempt_insert(localCopy,aSel); 00227 } 00228 00229 }
void DCNeutralVisibleList< Neutral , Neutral::CandidateClass >::fill | ( | Iterator | first, | |
Iterator | last | |||
) | [inline, protected, inherited] |
Definition at line 130 of file DCNeutralVisibleList.h.
References DCNeutralVisibleList< Neutral, CandidateClass >::fill(), DCNeutralVisibleList< Neutral, CandidateClass >::m_function, and DCNeutralVisibleList< Neutral, CandidateClass >::m_functionalObject.
00130 { 00131 if ( 0 != m_function ) { 00132 fill(first,last, dchain::NewMaker<Neutral>(), m_function); 00133 } else if (m_functionalObject) { 00134 fill(first,last,dchain::NewMaker<Neutral>(),m_functionalObject); 00135 } else { 00136 fill(first,last, dchain::NewMaker<Neutral>(), dchain::SelectAll<Neutral>()); 00137 } 00138 }
void DCFillableNeutralList< Neutral >::fill | ( | const dchain::LabeledParticleList< Neutral, typename Neutral::CandidateClass > & | aList | ) | [private] |
Reimplemented from DCNeutralVisibleList< Neutral, Neutral::CandidateClass >.
Definition at line 238 of file DCFillableNeutralList.cc.
References DCFillableNeutralList< Neutral >::fill().
00241 { 00242 DCNeutralVisibleList< Neutral , 00243 typename Neutral::CandidateClass >::fill( aList ) ; 00244 }
void DCFillableNeutralList< Neutral >::fill | ( | WitnessIterator | first, | |
WitnessIterator | last | |||
) | [inline] |
Definition at line 109 of file DCFillableNeutralList.h.
References DCNeutralVisibleList< Neutral, CandidateClass >::fill().
Referenced by dc_fill(), DCFillableNeutralList< Neutral >::DCFillableNeutralList(), DCFillableNeutralList< Neutral >::fill(), and DCFillableNeutralList< Neutral >::operator=().
00109 { 00110 DCNeutralVisibleList< Neutral , typename Neutral::CandidateClass >::fill(first,last); 00111 }
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::insert | ( | THolder & | pPossible | ) | [inline, inherited] |
Definition at line 204 of file NeutralVisibleList.h.
References dchain::conjugation::kNone, and dchain::NeutralVisibleList< Neutral, CandidateClass >::m_list.
00204 { 00205 m_list->push_back( LabeledParticle< Neutral >( pPossible , 00206 conjugation::kNone ) ) ; 00207 }
bool dchain::ConjugateList< Neutral::CandidateClass >::isConjugateOf | ( | const ConjugateList< Neutral::CandidateClass > & | aList | ) | const [inherited] |
virtual bool dchain::ConjugateList< Neutral::CandidateClass >::isSelfConjugate | ( | ) | const [virtual, inherited] |
Referenced by operator+().
void dchain::CandidateList< Neutral::CandidateClass >::iterate | ( | const TAnalyzer & | analyze | ) | const [inline, inherited] |
Definition at line 102 of file CandidateList.h.
00102 { 00103 const_iterator finished ( end() ); 00104 for ( const_iterator entry ( begin() ) ; 00105 entry != finished ; 00106 ++entry ) { 00107 analyze( (*entry)() ) ; 00108 } 00109 }
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::iterate | ( | TAnalyze & | analyze | ) | const [inline, inherited] |
Definition at line 180 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_begin(), and dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_end().
00180 { 00181 const_iterator finished ( particle_end() ) ; 00182 for ( const_iterator entry ( particle_begin() ) ; 00183 entry != finished ; 00184 ++entry ) { 00185 analyze( (*entry)() ) ; 00186 } 00187 }
void dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::iterate | ( | const TAnalyze & | analyze | ) | const [inline, inherited] |
Definition at line 170 of file NeutralVisibleList.h.
References dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_begin(), and dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_end().
00170 { 00171 const_iterator finished ( particle_end() ) ; 00172 for ( const_iterator entry ( particle_begin() ) ; 00173 entry != finished ; 00174 ++entry ) { 00175 analyze( (*entry)() ) ; 00176 } 00177 }
virtual conjugation::Label dchain::ConjugateList< Neutral::CandidateClass >::label | ( | ) | const [virtual, inherited] |
virtual const dchain::LabeledParticleList< Neutral , Neutral::CandidateClass >& dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::labeledCandidateList | ( | ) | const [protected, virtual, inherited] |
Implements dchain::CandidateList< Neutral::CandidateClass >.
virtual dchain::LabeledParticleList< Neutral , Neutral::CandidateClass >& dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::labeledCandidateList | ( | ) | [protected, virtual, inherited] |
Implements dchain::CandidateList< Neutral::CandidateClass >.
const DCFillableNeutralList<Neutral>& DCFillableNeutralList< Neutral >::operator= | ( | const Witness & | aWitnessList | ) | [inline] |
Reimplemented from dchain::NeutralVisibleList< Neutral, Neutral::CandidateClass >.
Definition at line 114 of file DCFillableNeutralList.h.
References dchain::NeutralVisibleList< Neutral, Neutral::CandidateClass >::eraseContents(), and DCFillableNeutralList< Neutral >::fill().
00114 { 00115 this->eraseContents(); 00116 fill(aWitnessList.begin(), aWitnessList.end()); 00117 return ( *this ) ; 00118 }
const DCFillableNeutralList< Neutral > & DCFillableNeutralList< Neutral >::operator= | ( | const DCFillableNeutralList< Neutral > & | aOtherList | ) |
Definition at line 195 of file DCFillableNeutralList.cc.
00197 { 00198 DCNeutralVisibleList< Neutral , 00199 typename Neutral::CandidateClass >::operator=( 00200 aOtherList ) ; 00201 return ( *this ) ; 00202 }
FillListWithSelection<self_type, TSelector> dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::operator[] | ( | const TSelector & | iSel | ) | [inline, inherited] |
Definition at line 157 of file NeutralVisibleList.h.
00157 { 00158 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00159 }
virtual const_partial_iterator dchain::ConjugateList< Neutral::CandidateClass >::partial_begin | ( | ) | const [virtual, inherited] |
virtual const_partial_iterator dchain::ConjugateList< Neutral::CandidateClass >::partial_end | ( | ) | const [virtual, inherited] |
void dchain::ConjugateList< Neutral::CandidateClass >::partial_iterate | ( | const TAnalyzer & | analyze | ) | const [inline, inherited] |
Definition at line 128 of file ConjugateList.h.
00128 { 00129 const_partial_iterator finished ( partial_end() ) ; 00130 for ( const_partial_iterator entry ( partial_begin() ) ; 00131 entry != finished ; 00132 ++entry ) { 00133 analyze( (*entry)() ) ; 00134 } 00135 }
int dchain::ConjugateList< Neutral::CandidateClass >::partial_size | ( | ) | const [inherited] |
const_iterator dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::particle_begin | ( | ) | const [inherited] |
iterator dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::particle_begin | ( | ) | [inherited] |
Referenced by operator+().
const_iterator dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::particle_end | ( | ) | const [inherited] |
iterator dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::particle_end | ( | ) | [inherited] |
Referenced by operator+().
SelectiveInserter<self_type,TSelect> dchain::NeutralVisibleList< Neutral , Neutral::CandidateClass >::selectiveInserter | ( | const TSelect & | iSelect | ) | [inline, inherited] |
creates an insert iterator that filters based on iSelect
Definition at line 191 of file NeutralVisibleList.h.
00191 { 00192 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
void dchain::ConjugateList< Neutral::CandidateClass >::setLabel | ( | const conjugation::Label | aLabel | ) | [protected, inherited] |
virtual int dchain::CandidateList< Neutral::CandidateClass >::size | ( | void | ) | const [virtual, inherited] |