bpp-seq3  3.0.0
bpp::EdIntSymbolList Class Referenceabstract

A event-driven IntSymbolList object. More...

#include <Bpp/Seq/IntSymbolList.h>

+ Inheritance diagram for bpp::EdIntSymbolList:
+ Collaboration diagram for bpp::EdIntSymbolList:

Public Member Functions

 EdIntSymbolList (const Alphabet *alpha)
 Build a new void EdIntSymbolList object with the specified alphabet. More...
 
 EdIntSymbolList (const std::vector< std::string > &list, const Alphabet *alpha)
 Build a new EdIntSymbolList object with the specified alphabet. The content of the site is initialized from a vector of characters. More...
 
 EdIntSymbolList (const std::vector< int > &list, const Alphabet *alpha)
 Build a new EdIntSymbolList object with the specified alphabet. The content of the site is initialized from a vector of integers. More...
 
 EdIntSymbolList (const IntSymbolList &list)
 The generic copy constructor. More...
 
 EdIntSymbolList (const EdIntSymbolList &list)
 The copy constructor. More...
 
EdIntSymbolListoperator= (const IntSymbolList &list)
 The generic assignment operator. More...
 
EdIntSymbolListoperator= (const EdIntSymbolList &list)
 The assignment operator. More...
 
 ~EdIntSymbolList ()
 
virtual void setContent (const std::vector< std::string > &list)
 
void setContent (const std::vector< int > &list)
 
virtual std::string toString () const
 Convert the list as a string. More...
 
virtual void addElement (const std::string &c)
 
virtual void addElement (size_t pos, const std::string &c)
 
virtual void setElement (size_t pos, const std::string &c)
 
virtual std::string getChar (size_t pos) const
 
void addIntSymbolListListener (IntSymbolListListener *listener)
 
void deleteElement (size_t pos)
 Remove the element at position 'pos'. More...
 
void deleteElements (size_t pos, size_t len)
 Remove the elements at position 'pos'. More...
 
virtual void addElement (const int &v)
 Add a character to the end of the list. More...
 
virtual void addElement (size_t pos, const int &v)
 Add a character at a certain position in the list. More...
 
virtual void setElement (size_t pos, const int &v)
 Set the element at position 'pos' to character 'c'. More...
 
const AlphabetgetAlphabet () const
 Get the alphabet associated to the list. More...
 
size_t size () const
 Get the number of elements in the list. More...
 
virtual const std::vector< int > & getContent () const
 
virtual const int & getElement (size_t pos) const
 Get the element at position 'pos' as a character. More...
 
virtual const int & getValue (size_t pos) const
 checked access to a character in list. More...
 
virtual const int & operator[] (size_t pos) const
 Operator [] overloaded for quick access to a character in list. More...
 
virtual int & operator[] (size_t pos)
 Operator [] overloaded for quick access to a character in list. More...
 
virtual void shuffle ()
 Randomly shuffle the content of the list, with linear complexity. More...
 
virtual double getStateValueAt (size_t siteIndex, int state) const
 
virtual double getStateValueAt (size_t siteIndex, int state) const
 From CruxSymbolList. More...
 
virtual double operator() (size_t siteIndex, int state) const
 
virtual double operator() (size_t siteIndex, int state) const
 
The Clonable interface
EdIntSymbolListclone () const
 
Acting on the content of the list.
virtual void setContent (const std::vector< T > &list)=0
 Set the whole content of the list. More...
 
Edition methods.
virtual void addElement (const T &c)=0
 Add a character to the end of the list. More...
 
virtual void addElement (size_t pos, const T &c)=0
 Add a character at a certain position in the list. More...
 
virtual void setElement (size_t pos, const T &c)=0
 Set the element at position 'pos' to character 'c'. More...
 

Protected Member Functions

virtual void beforeSequenceChanged (const IntSymbolListEditionEvent &event)
 
virtual void afterSequenceChanged (const IntSymbolListEditionEvent &event)
 
virtual void beforeSequenceInserted (const IntSymbolListInsertionEvent &event)
 
virtual void afterSequenceInserted (const IntSymbolListInsertionEvent &event)
 
virtual void beforeSequenceDeleted (const IntSymbolListDeletionEvent &event)
 
virtual void afterSequenceDeleted (const IntSymbolListDeletionEvent &event)
 
virtual void beforeSequenceSubstituted (const IntSymbolListSubstitutionEvent &event)
 
virtual void afterSequenceSubstituted (const IntSymbolListSubstitutionEvent &event)
 
void propagateEvents (bool yn)
 
bool propagateEvents () const
 

Protected Attributes

std::vector< CoreSymbolListListener< int > * > listeners_
 Contains the listeners. More...
 
std::vector< int > content_
 The list content. More...
 

Private Attributes

bool propagateEvents_
 
const Alphabetalphabet_
 The Alphabet attribute must be initialized in constructor and then can never be changed. More...
 

Events handling

virtual size_t getNumberOfListeners () const
 
virtual const CoreSymbolListListener< int > & getListener (size_t i) const
 
virtual CoreSymbolListListener< int > & getListener (size_t i)
 
virtual void addCoreSymbolListListener (CoreSymbolListListener< int > *listener)
 
virtual void removeCoreSymbolListListener (CoreSymbolListListener< int > *listener)
 
void fireBeforeSequenceChanged (const CoreSymbolListEditionEvent< int > &event)
 
void fireAfterSequenceChanged (const CoreSymbolListEditionEvent< int > &event)
 
void fireBeforeSequenceInserted (const CoreSymbolListInsertionEvent< int > &event)
 
void fireAfterSequenceInserted (const CoreSymbolListInsertionEvent< int > &event)
 
void fireBeforeSequenceDeleted (const CoreSymbolListDeletionEvent< int > &event)
 
void fireAfterSequenceDeleted (const CoreSymbolListDeletionEvent< int > &event)
 
void fireBeforeSequenceSubstituted (const CoreSymbolListSubstitutionEvent< int > &event)
 
void fireAfterSequenceSubstituted (const CoreSymbolListSubstitutionEvent< int > &event)
 

Events handling

virtual void addCoreSymbolListListener (CoreSymbolListListener< T > *listener)=0
 
virtual void removeCoreSymbolListListener (CoreSymbolListListener< T > *listener)=0
 
virtual void beforeSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void afterSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void beforeSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void afterSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void beforeSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void afterSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void beforeSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 
virtual void afterSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 
virtual void fireBeforeSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void fireAfterSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void fireBeforeSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void fireAfterSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void fireBeforeSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void fireAfterSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void fireBeforeSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 
virtual void fireAfterSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 

Detailed Description

A event-driven IntSymbolList object.

This is a general purpose container, containing an ordered list of states(= letters). The states that allowed to be present in the list are defined by an alphabet object, which is passed to the list constructor by a pointer.

For programming convenience, the states are stored as integers, but the translation toward and from a char description is easily performed with the Alphabet classes.

See also
Alphabet

Definition at line 254 of file IntSymbolList.h.

Constructor & Destructor Documentation

◆ EdIntSymbolList() [1/5]

bpp::EdIntSymbolList::EdIntSymbolList ( const Alphabet alpha)
inline

Build a new void EdIntSymbolList object with the specified alphabet.

Parameters
alphaThe alphabet to use.

Definition at line 263 of file IntSymbolList.h.

Referenced by clone().

◆ EdIntSymbolList() [2/5]

EdIntSymbolList::EdIntSymbolList ( const std::vector< std::string > &  list,
const Alphabet alpha 
)

Build a new EdIntSymbolList object with the specified alphabet. The content of the site is initialized from a vector of characters.

Parameters
listThe content of the site.
alphaThe alphabet to use.

Definition at line 178 of file IntSymbolList.cpp.

References setContent().

◆ EdIntSymbolList() [3/5]

EdIntSymbolList::EdIntSymbolList ( const std::vector< int > &  list,
const Alphabet alpha 
)

Build a new EdIntSymbolList object with the specified alphabet. The content of the site is initialized from a vector of integers.

Parameters
listThe content of the site.
alphaThe alphabet to use.

Definition at line 184 of file IntSymbolList.cpp.

◆ EdIntSymbolList() [4/5]

bpp::EdIntSymbolList::EdIntSymbolList ( const IntSymbolList list)

The generic copy constructor.

◆ EdIntSymbolList() [5/5]

EdIntSymbolList::EdIntSymbolList ( const EdIntSymbolList list)

The copy constructor.

Definition at line 190 of file IntSymbolList.cpp.

◆ ~EdIntSymbolList()

bpp::EdIntSymbolList::~EdIntSymbolList ( )
inline

Definition at line 312 of file IntSymbolList.h.

Member Function Documentation

◆ addCoreSymbolListListener() [1/2]

virtual void bpp::EdSymbolList< int >::addCoreSymbolListListener ( CoreSymbolListListener< int > *  listener)
inlinevirtualinherited

Definition at line 439 of file SymbolList.h.

◆ addCoreSymbolListListener() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::addCoreSymbolListListener ( CoreSymbolListListener< T > *  listener)
pure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ addElement() [1/6]

virtual void bpp::EdSymbolList< int >::addElement ( const int &  v)
inlinevirtualinherited

Add a character to the end of the list.

Parameters
cThe character to add.

Definition at line 394 of file SymbolList.h.

◆ addElement() [2/6]

void EdIntSymbolList::addElement ( const std::string &  c)
virtual

◆ addElement() [3/6]

template<class T >
virtual void bpp::CoreSymbolList< T >::addElement ( const T &  c)
pure virtualinherited

◆ addElement() [4/6]

virtual void bpp::EdSymbolList< int >::addElement ( size_t  pos,
const int &  v 
)
inlinevirtualinherited

Add a character at a certain position in the list.

Parameters
posThe postion where to insert the element.
cThe character to add.

Definition at line 402 of file SymbolList.h.

◆ addElement() [5/6]

void EdIntSymbolList::addElement ( size_t  pos,
const std::string &  c 
)
virtual

◆ addElement() [6/6]

template<class T >
virtual void bpp::CoreSymbolList< T >::addElement ( size_t  pos,
const T &  c 
)
pure virtualinherited

Add a character at a certain position in the list.

Parameters
posThe postion where to insert the element.
cThe character to add.

Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.

◆ addIntSymbolListListener()

void bpp::EdIntSymbolList::addIntSymbolListListener ( IntSymbolListListener listener)
inline

◆ afterSequenceChanged() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::afterSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ afterSequenceChanged() [2/2]

virtual void bpp::EdIntSymbolList::afterSequenceChanged ( const IntSymbolListEditionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 340 of file IntSymbolList.h.

◆ afterSequenceDeleted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::afterSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ afterSequenceDeleted() [2/2]

virtual void bpp::EdIntSymbolList::afterSequenceDeleted ( const IntSymbolListDeletionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 344 of file IntSymbolList.h.

◆ afterSequenceInserted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::afterSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ afterSequenceInserted() [2/2]

virtual void bpp::EdIntSymbolList::afterSequenceInserted ( const IntSymbolListInsertionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 342 of file IntSymbolList.h.

◆ afterSequenceSubstituted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::afterSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ afterSequenceSubstituted() [2/2]

virtual void bpp::EdIntSymbolList::afterSequenceSubstituted ( const IntSymbolListSubstitutionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 346 of file IntSymbolList.h.

◆ beforeSequenceChanged() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::beforeSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ beforeSequenceChanged() [2/2]

virtual void bpp::EdIntSymbolList::beforeSequenceChanged ( const IntSymbolListEditionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 339 of file IntSymbolList.h.

◆ beforeSequenceDeleted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::beforeSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ beforeSequenceDeleted() [2/2]

virtual void bpp::EdIntSymbolList::beforeSequenceDeleted ( const IntSymbolListDeletionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 343 of file IntSymbolList.h.

◆ beforeSequenceInserted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::beforeSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ beforeSequenceInserted() [2/2]

virtual void bpp::EdIntSymbolList::beforeSequenceInserted ( const IntSymbolListInsertionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 341 of file IntSymbolList.h.

◆ beforeSequenceSubstituted() [1/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::beforeSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ beforeSequenceSubstituted() [2/2]

virtual void bpp::EdIntSymbolList::beforeSequenceSubstituted ( const IntSymbolListSubstitutionEvent event)
inlineprotectedvirtual

Reimplemented from bpp::EdSymbolList< int >.

Definition at line 345 of file IntSymbolList.h.

◆ clone()

EdIntSymbolList* bpp::EdIntSymbolList::clone ( ) const
inlinevirtual

Implements bpp::EdCoreSymbolList< T >.

Reimplemented in bpp::SequenceWithQuality, and bpp::SequenceWithAnnotation.

Definition at line 309 of file IntSymbolList.h.

References EdIntSymbolList().

◆ deleteElement()

void bpp::EdSymbolList< int >::deleteElement ( size_t  pos)
inlinevirtualinherited

Remove the element at position 'pos'.

Parameters
posThe position of the element to remove.

Reimplemented from bpp::SymbolList< int >.

Definition at line 377 of file SymbolList.h.

◆ deleteElements()

void bpp::EdSymbolList< int >::deleteElements ( size_t  pos,
size_t  len 
)
inlinevirtualinherited

Remove the elements at position 'pos'.

Parameters
posThe position of the first element to remove.
lenThe length of the region to remove.

Reimplemented from bpp::SymbolList< int >.

Definition at line 386 of file SymbolList.h.

◆ fireAfterSequenceChanged() [1/2]

void bpp::EdSymbolList< int >::fireAfterSequenceChanged ( const CoreSymbolListEditionEvent< int > &  event)
inlineprotectedinherited

Definition at line 472 of file SymbolList.h.

◆ fireAfterSequenceChanged() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireAfterSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireAfterSequenceDeleted() [1/2]

void bpp::EdSymbolList< int >::fireAfterSequenceDeleted ( const CoreSymbolListDeletionEvent< int > &  event)
inlineprotectedinherited

Definition at line 512 of file SymbolList.h.

◆ fireAfterSequenceDeleted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireAfterSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireAfterSequenceInserted() [1/2]

void bpp::EdSymbolList< int >::fireAfterSequenceInserted ( const CoreSymbolListInsertionEvent< int > &  event)
inlineprotectedinherited

Definition at line 492 of file SymbolList.h.

◆ fireAfterSequenceInserted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireAfterSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireAfterSequenceSubstituted() [1/2]

void bpp::EdSymbolList< int >::fireAfterSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< int > &  event)
inlineprotectedinherited

Definition at line 532 of file SymbolList.h.

◆ fireAfterSequenceSubstituted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireAfterSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireBeforeSequenceChanged() [1/2]

void bpp::EdSymbolList< int >::fireBeforeSequenceChanged ( const CoreSymbolListEditionEvent< int > &  event)
inlineprotectedinherited

Definition at line 462 of file SymbolList.h.

◆ fireBeforeSequenceChanged() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireBeforeSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireBeforeSequenceDeleted() [1/2]

void bpp::EdSymbolList< int >::fireBeforeSequenceDeleted ( const CoreSymbolListDeletionEvent< int > &  event)
inlineprotectedinherited

Definition at line 502 of file SymbolList.h.

◆ fireBeforeSequenceDeleted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireBeforeSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireBeforeSequenceInserted() [1/2]

void bpp::EdSymbolList< int >::fireBeforeSequenceInserted ( const CoreSymbolListInsertionEvent< int > &  event)
inlineprotectedinherited

Definition at line 482 of file SymbolList.h.

◆ fireBeforeSequenceInserted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireBeforeSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ fireBeforeSequenceSubstituted() [1/2]

void bpp::EdSymbolList< int >::fireBeforeSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< int > &  event)
inlineprotectedinherited

Definition at line 522 of file SymbolList.h.

◆ fireBeforeSequenceSubstituted() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::fireBeforeSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
protectedpure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ getAlphabet()

const Alphabet* bpp::SymbolList< int >::getAlphabet ( ) const
inlinevirtualinherited

Get the alphabet associated to the list.

Returns
A const pointer to the alphabet.
See also
Alphabet class.

Implements bpp::CruxSymbolList.

Definition at line 169 of file SymbolList.h.

◆ getChar()

string EdIntSymbolList::getChar ( size_t  pos) const
virtual

◆ getContent()

virtual const std::vector<int >& bpp::SymbolList< int >::getContent ( ) const
inlinevirtualinherited

Implements bpp::CoreSymbolList< T >.

Definition at line 178 of file SymbolList.h.

◆ getElement()

virtual const int & bpp::SymbolList< int >::getElement ( size_t  pos) const
inlinevirtualinherited

Get the element at position 'pos' as a character.

Parameters
posThe position of the character to retrieve.

Implements bpp::CoreSymbolList< T >.

Definition at line 220 of file SymbolList.h.

◆ getListener() [1/2]

virtual CoreSymbolListListener<int >& bpp::EdSymbolList< int >::getListener ( size_t  i)
inlinevirtualinherited

Implements bpp::EdCoreSymbolList< T >.

Definition at line 432 of file SymbolList.h.

◆ getListener() [2/2]

virtual const CoreSymbolListListener<int >& bpp::EdSymbolList< int >::getListener ( size_t  i) const
inlinevirtualinherited

Implements bpp::EdCoreSymbolList< T >.

Definition at line 425 of file SymbolList.h.

◆ getNumberOfListeners()

virtual size_t bpp::EdSymbolList< int >::getNumberOfListeners ( ) const
inlinevirtualinherited

Implements bpp::EdCoreSymbolList< T >.

Definition at line 423 of file SymbolList.h.

◆ getStateValueAt() [1/2]

◆ getStateValueAt() [2/2]

template<class T >
virtual double bpp::EdCoreSymbolList< T >::getStateValueAt ( size_t  siteIndex,
int  state 
) const
inlinevirtualinherited

From CruxSymbolList.

Reimplemented from bpp::CruxSymbolList.

Definition at line 416 of file CoreSymbolList.h.

References bpp::CruxSymbolList::getStateValueAt().

◆ getValue()

virtual const int & bpp::SymbolList< int >::getValue ( size_t  pos) const
inlinevirtualinherited

checked access to a character in list.

Parameters
posThe position to retrieve.
Returns
The T value of character at position pos.

Implements bpp::CoreSymbolList< T >.

Definition at line 227 of file SymbolList.h.

◆ operator()() [1/2]

virtual double bpp::CruxSymbolList::operator() ( size_t  siteIndex,
int  state 
) const
inlinevirtualinherited

◆ operator()() [2/2]

template<class T >
virtual double bpp::EdCoreSymbolList< T >::operator() ( size_t  siteIndex,
int  state 
) const
inlinevirtualinherited

Reimplemented from bpp::CruxSymbolList.

Definition at line 421 of file CoreSymbolList.h.

References bpp::CruxSymbolList::operator()().

◆ operator=() [1/2]

EdIntSymbolList & EdIntSymbolList::operator= ( const EdIntSymbolList list)

The assignment operator.

Definition at line 194 of file IntSymbolList.cpp.

References bpp::EdSymbolList< T >::operator=().

◆ operator=() [2/2]

EdIntSymbolList& bpp::EdIntSymbolList::operator= ( const IntSymbolList list)

The generic assignment operator.

Referenced by bpp::SequenceWithAnnotation::operator=().

◆ operator[]() [1/2]

virtual int & bpp::SymbolList< int >::operator[] ( size_t  pos)
inlinevirtualinherited

Operator [] overloaded for quick access to a character in list.

Parameters
posThe position to retrieve.
Returns
The T value of character at position pos.

Implements bpp::CoreSymbolList< T >.

Definition at line 236 of file SymbolList.h.

◆ operator[]() [2/2]

virtual const int & bpp::SymbolList< int >::operator[] ( size_t  pos) const
inlinevirtualinherited

Operator [] overloaded for quick access to a character in list.

Parameters
posThe position to retrieve.
Returns
The T value of character at position pos.

Implements bpp::CoreSymbolList< T >.

Definition at line 234 of file SymbolList.h.

◆ propagateEvents() [1/2]

bool bpp::EdSymbolList< int >::propagateEvents ( ) const
inlineprotectedvirtualinherited

Implements bpp::EdCoreSymbolList< T >.

Definition at line 545 of file SymbolList.h.

◆ propagateEvents() [2/2]

void bpp::EdSymbolList< int >::propagateEvents ( bool  yn)
inlineprotectedvirtualinherited

Implements bpp::EdCoreSymbolList< T >.

Definition at line 544 of file SymbolList.h.

◆ removeCoreSymbolListListener() [1/2]

virtual void bpp::EdSymbolList< int >::removeCoreSymbolListListener ( CoreSymbolListListener< int > *  listener)
inlinevirtualinherited

Definition at line 444 of file SymbolList.h.

◆ removeCoreSymbolListListener() [2/2]

template<class T >
virtual void bpp::EdCoreSymbolList< T >::removeCoreSymbolListListener ( CoreSymbolListListener< T > *  listener)
pure virtualinherited

Implemented in bpp::EdSymbolList< T >.

◆ setContent() [1/3]

void EdIntSymbolList::setContent ( const std::vector< int > &  list)
virtual

◆ setContent() [2/3]

void EdIntSymbolList::setContent ( const std::vector< std::string > &  list)
virtual

◆ setContent() [3/3]

template<class T >
virtual void bpp::CoreSymbolList< T >::setContent ( const std::vector< T > &  list)
pure virtualinherited

Set the whole content of the list.

Parameters
listThe new content of the list.
See also
The list constructor for information about the way lists are internaly stored.

Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.

Referenced by bpp::Pasta::nextSequence().

◆ setElement() [1/3]

virtual void bpp::EdSymbolList< int >::setElement ( size_t  pos,
const int &  v 
)
inlinevirtualinherited

Set the element at position 'pos' to character 'c'.

Parameters
posThe position of the character to set.
cThe value of the element.

Definition at line 410 of file SymbolList.h.

◆ setElement() [2/3]

void EdIntSymbolList::setElement ( size_t  pos,
const std::string &  c 
)
virtual

◆ setElement() [3/3]

template<class T >
virtual void bpp::CoreSymbolList< T >::setElement ( size_t  pos,
const T &  c 
)
pure virtualinherited

Set the element at position 'pos' to character 'c'.

Parameters
posThe position of the character to set.
cThe value of the element.

Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.

Referenced by bpp::SequenceTools::complement(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::SequenceTools::replaceStopsWithGaps(), and bpp::AlignedSequenceContainer::setSite().

◆ shuffle()

virtual void bpp::SymbolList< int >::shuffle ( )
inlinevirtualinherited

Randomly shuffle the content of the list, with linear complexity.

Implements bpp::CruxSymbolList.

Definition at line 238 of file SymbolList.h.

◆ size()

size_t bpp::SymbolList< int >::size ( ) const
inlinevirtualinherited

Get the number of elements in the list.

Returns
The number of sites in the list.

Implements bpp::CruxSymbolList.

Definition at line 171 of file SymbolList.h.

◆ toString()

string EdIntSymbolList::toString ( ) const
virtual

Convert the list as a string.

This method is useful for dumping a list to a file or to the screen for display.

Returns
The whole list as a string.

Reimplemented from bpp::SymbolList< int >.

Definition at line 236 of file IntSymbolList.cpp.

References bpp::SymbolList< int >::content_, bpp::StringSequenceTools::decodeSequence(), and bpp::SymbolList< int >::getAlphabet().

Member Data Documentation

◆ alphabet_

const Alphabet* bpp::SymbolList< int >::alphabet_
privateinherited

The Alphabet attribute must be initialized in constructor and then can never be changed.

To apply another alphabet to a list you'll have to create a new list.

Definition at line 79 of file SymbolList.h.

◆ content_

std::vector<int > bpp::SymbolList< int >::content_
protectedinherited

The list content.

Definition at line 85 of file SymbolList.h.

◆ listeners_

std::vector<CoreSymbolListListener<int >* > bpp::EdSymbolList< int >::listeners_
protectedinherited

Contains the listeners.

Definition at line 257 of file SymbolList.h.

◆ propagateEvents_

bool bpp::EdSymbolList< int >::propagateEvents_
privateinherited

Definition at line 251 of file SymbolList.h.


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