bpp-seq3
3.0.0
|
#include <Bpp/Seq/SymbolList.h>
Public Member Functions | |
virtual void | setContent (const std::vector< T > &list) |
Set the whole content of the list. More... | |
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 T &v) |
Add a character to the end of the list. More... | |
virtual void | addElement (size_t pos, const T &v) |
Add a character at a certain position in the list. More... | |
virtual void | setElement (size_t pos, const T &v) |
Set the element at position 'pos' to character 'c'. More... | |
const Alphabet * | getAlphabet () 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< T > & | getContent () const |
virtual std::string | toString () const |
Convert the list as a string. More... | |
virtual const T & | getElement (size_t pos) const |
Get the element at position 'pos' as a character. More... | |
virtual const T & | getValue (size_t pos) const |
checked access to a character in list. More... | |
virtual const T & | operator[] (size_t pos) const |
Operator [] overloaded for quick access to a character in list. More... | |
virtual T & | 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 | operator() (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 |
Protected Member Functions | |
EdSymbolList (const Alphabet *alpha) | |
Build a new void CoreSymbolList object with the specified alphabet. More... | |
EdSymbolList (const std::vector< T > &list, const Alphabet *alpha) | |
Build a new CoreSymbolList object with the specified alphabet. The content of the site is initialized from a vector of integers. More... | |
EdSymbolList (const CoreSymbolList< T > &list) | |
The generic copy constructor. More... | |
EdSymbolList (const EdSymbolList< T > &list) | |
The copy constructor. More... | |
EdSymbolList< T > & | operator= (const CoreSymbolList< T > &list) |
The generic assignment operator. More... | |
EdSymbolList< T > & | operator= (const EdSymbolList &list) |
The assignment operator. More... | |
virtual | ~EdSymbolList () |
void | propagateEvents (bool yn) |
bool | propagateEvents () const |
The Clonable interface | |
EdSymbolList * | clone () const |
Protected Attributes | |
std::vector< CoreSymbolListListener< T > * > | listeners_ |
Contains the listeners. More... | |
std::vector< T > | content_ |
The list content. More... | |
Private Attributes | |
bool | propagateEvents_ |
const Alphabet * | alphabet_ |
The Alphabet attribute must be initialized in constructor and then can never be changed. More... | |
Definition at line 246 of file SymbolList.h.
|
inlineprotected |
Build a new void CoreSymbolList object with the specified alphabet.
alpha | The alphabet to use. |
Definition at line 265 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::clone().
|
inlineprotected |
Build a new CoreSymbolList object with the specified alphabet. The content of the site is initialized from a vector of integers.
list | The content of the site. |
alpha | The alphabet to use. |
BadIntException | If the content does not match the specified alphabet. |
Definition at line 276 of file SymbolList.h.
|
inlineprotected |
The generic copy constructor.
Definition at line 283 of file SymbolList.h.
|
inlineprotected |
The copy constructor.
Definition at line 291 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlineprotectedvirtual |
Definition at line 355 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlinevirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 439 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlinevirtual |
Add a character to the end of the list.
c | The character to add. |
Reimplemented from bpp::SymbolList< T >.
Definition at line 394 of file SymbolList.h.
References bpp::SymbolList< T >::addElement(), bpp::EdSymbolList< T >::fireAfterSequenceInserted(), and bpp::EdSymbolList< T >::fireBeforeSequenceInserted().
Referenced by bpp::EdIntSymbolList::addElement(), and bpp::SequenceWithQuality::addElement().
|
inlinevirtual |
Add a character at a certain position in the list.
pos | The postion where to insert the element. |
c | The character to add. |
Reimplemented from bpp::SymbolList< T >.
Definition at line 402 of file SymbolList.h.
References bpp::SymbolList< T >::addElement(), bpp::EdSymbolList< T >::fireAfterSequenceInserted(), and bpp::EdSymbolList< T >::fireBeforeSequenceInserted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 454 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireAfterSequenceChanged().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 458 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireAfterSequenceDeleted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 456 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireAfterSequenceInserted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 460 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireAfterSequenceSubstituted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 453 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireBeforeSequenceChanged().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 457 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireBeforeSequenceDeleted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 455 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireBeforeSequenceInserted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Reimplemented in bpp::EdIntSymbolList.
Definition at line 459 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireBeforeSequenceSubstituted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 351 of file SymbolList.h.
References bpp::EdSymbolList< T >::EdSymbolList().
|
inlinevirtual |
Remove the element at position 'pos'.
pos | The position of the element to remove. |
Reimplemented from bpp::SymbolList< T >.
Definition at line 377 of file SymbolList.h.
References bpp::SymbolList< T >::deleteElement(), bpp::EdSymbolList< T >::fireAfterSequenceDeleted(), and bpp::EdSymbolList< T >::fireBeforeSequenceDeleted().
|
inlinevirtual |
Remove the elements at position 'pos'.
pos | The position of the first element to remove. |
len | The length of the region to remove. |
Reimplemented from bpp::SymbolList< T >.
Definition at line 386 of file SymbolList.h.
References bpp::SymbolList< T >::deleteElements(), bpp::EdSymbolList< T >::fireAfterSequenceDeleted(), and bpp::EdSymbolList< T >::fireBeforeSequenceDeleted().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 472 of file SymbolList.h.
References bpp::EdSymbolList< T >::afterSequenceChanged(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::setContent().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 512 of file SymbolList.h.
References bpp::EdSymbolList< T >::afterSequenceDeleted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::deleteElement(), and bpp::EdSymbolList< T >::deleteElements().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 492 of file SymbolList.h.
References bpp::EdSymbolList< T >::afterSequenceInserted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::addElement().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 532 of file SymbolList.h.
References bpp::EdSymbolList< T >::afterSequenceSubstituted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::setElement().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 462 of file SymbolList.h.
References bpp::EdSymbolList< T >::beforeSequenceChanged(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::setContent().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 502 of file SymbolList.h.
References bpp::EdSymbolList< T >::beforeSequenceDeleted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::deleteElement(), and bpp::EdSymbolList< T >::deleteElements().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 482 of file SymbolList.h.
References bpp::EdSymbolList< T >::beforeSequenceInserted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::addElement().
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 522 of file SymbolList.h.
References bpp::EdSymbolList< T >::beforeSequenceSubstituted(), bpp::EdSymbolList< T >::listeners_, and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdSymbolList< T >::setElement().
|
inlinevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::CruxSymbolList.
Definition at line 169 of file SymbolList.h.
References bpp::SymbolList< T >::alphabet_.
Referenced by bpp::SequenceWithQualityTools::complement(), bpp::SequenceWithQualityTools::concatenate(), bpp::SequenceWithAnnotation::merge(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SequenceWithQualityTools::reverseTranscript(), bpp::SequenceWithQualityTools::subseq(), and bpp::SequenceWithQualityTools::transcript().
|
inlinevirtualinherited |
Implements bpp::CoreSymbolList< T >.
Definition at line 178 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 220 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
|
inlinevirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 432 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlinevirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 425 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlinevirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 423 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_.
|
inlinevirtualinherited |
Reimplemented in bpp::BasicProbabilisticSymbolList, bpp::BasicIntSymbolList, and bpp::EdCoreSymbolList< T >.
Definition at line 147 of file CoreSymbolList.h.
Referenced by bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::EdCoreSymbolList< T >::getStateValueAt(), and bpp::Pasta::writeSequence().
|
inlinevirtualinherited |
From CruxSymbolList.
Reimplemented from bpp::CruxSymbolList.
Definition at line 416 of file CoreSymbolList.h.
References bpp::CruxSymbolList::getStateValueAt().
|
inlinevirtualinherited |
checked access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 227 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
Referenced by bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant(), bpp::CodonSiteTools::isFourFoldDegenerated(), and bpp::CodonSiteTools::numberOfSubstitutions().
|
inlinevirtualinherited |
Reimplemented in bpp::BasicProbabilisticSymbolList, bpp::BasicIntSymbolList, and bpp::EdCoreSymbolList< T >.
Definition at line 154 of file CoreSymbolList.h.
Referenced by bpp::EdCoreSymbolList< T >::operator()().
|
inlinevirtualinherited |
Reimplemented from bpp::CruxSymbolList.
Definition at line 421 of file CoreSymbolList.h.
References bpp::CruxSymbolList::operator()().
|
inlineprotected |
The generic assignment operator.
Definition at line 307 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_, bpp::SymbolList< T >::operator=(), and bpp::EdSymbolList< T >::propagateEvents_.
Referenced by bpp::EdIntSymbolList::operator=().
|
inlineprotected |
The assignment operator.
Definition at line 324 of file SymbolList.h.
References bpp::EdSymbolList< T >::listeners_, bpp::SymbolList< T >::operator=(), and bpp::EdSymbolList< T >::propagateEvents_.
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 236 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 234 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 545 of file SymbolList.h.
References bpp::EdSymbolList< T >::propagateEvents_.
|
inlineprotectedvirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 544 of file SymbolList.h.
References bpp::EdSymbolList< T >::propagateEvents_.
|
inlinevirtual |
Implements bpp::EdCoreSymbolList< T >.
Definition at line 444 of file SymbolList.h.
References bpp::CoreSymbolListListener< T >::isRemovable(), and bpp::EdSymbolList< T >::listeners_.
|
inlinevirtual |
Set the whole content of the list.
list | The new content of the list. |
Reimplemented from bpp::SymbolList< T >.
Reimplemented in bpp::SequenceWithAnnotation, and bpp::EdIntSymbolList.
Definition at line 367 of file SymbolList.h.
References bpp::EdSymbolList< T >::fireAfterSequenceChanged(), bpp::EdSymbolList< T >::fireBeforeSequenceChanged(), and bpp::SymbolList< T >::setContent().
Referenced by bpp::EdIntSymbolList::setContent().
|
inlinevirtual |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element. |
Reimplemented from bpp::SymbolList< T >.
Definition at line 410 of file SymbolList.h.
References bpp::EdSymbolList< T >::fireAfterSequenceSubstituted(), bpp::EdSymbolList< T >::fireBeforeSequenceSubstituted(), and bpp::SymbolList< T >::setElement().
Referenced by bpp::EdIntSymbolList::setElement().
|
inlinevirtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implements bpp::CruxSymbolList.
Definition at line 238 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Get the number of elements in the list.
Implements bpp::CruxSymbolList.
Definition at line 171 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
Referenced by bpp::SymbolList< T >::addElement(), bpp::SymbolList< T >::deleteElement(), bpp::SymbolList< T >::deleteElements(), bpp::SymbolList< T >::getElement(), bpp::SymbolList< T >::getValue(), bpp::SequenceMask::isValidWith(), bpp::SequenceQuality::isValidWith(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SymbolList< T >::setElement(), and bpp::SequenceWithQualityTools::subseq().
|
inlinevirtualinherited |
Convert the list as a string.
This method is useful for dumping a list to a file or to the screen for display.
Implements bpp::CruxSymbolList.
Reimplemented in bpp::BasicSequence, bpp::EdIntSymbolList, and bpp::BasicIntSymbolList.
Definition at line 180 of file SymbolList.h.
|
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.
Referenced by bpp::SymbolList< T >::getAlphabet(), and bpp::SymbolList< T >::operator=().
|
protectedinherited |
The list content.
Definition at line 85 of file SymbolList.h.
Referenced by bpp::SymbolList< T >::addElement(), bpp::SymbolList< T >::deleteElement(), bpp::SymbolList< T >::deleteElements(), bpp::SymbolList< T >::getContent(), bpp::SymbolList< T >::getElement(), bpp::SymbolList< T >::getValue(), bpp::SymbolList< T >::operator=(), bpp::SymbolList< T >::operator[](), bpp::SymbolList< T >::setContent(), bpp::SymbolList< T >::setElement(), bpp::SymbolList< T >::shuffle(), bpp::SymbolList< T >::size(), and bpp::SymbolList< T >::SymbolList().
|
protected |
Contains the listeners.
Definition at line 257 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::addCoreSymbolListListener(), bpp::EdSymbolList< T >::EdSymbolList(), bpp::EdSymbolList< T >::fireAfterSequenceChanged(), bpp::EdSymbolList< T >::fireAfterSequenceDeleted(), bpp::EdSymbolList< T >::fireAfterSequenceInserted(), bpp::EdSymbolList< T >::fireAfterSequenceSubstituted(), bpp::EdSymbolList< T >::fireBeforeSequenceChanged(), bpp::EdSymbolList< T >::fireBeforeSequenceDeleted(), bpp::EdSymbolList< T >::fireBeforeSequenceInserted(), bpp::EdSymbolList< T >::fireBeforeSequenceSubstituted(), bpp::EdSymbolList< T >::getListener(), bpp::EdSymbolList< T >::getNumberOfListeners(), bpp::EdSymbolList< T >::operator=(), bpp::EdSymbolList< T >::removeCoreSymbolListListener(), and bpp::EdSymbolList< T >::~EdSymbolList().
|
private |
Definition at line 251 of file SymbolList.h.
Referenced by bpp::EdSymbolList< T >::fireAfterSequenceChanged(), bpp::EdSymbolList< T >::fireAfterSequenceDeleted(), bpp::EdSymbolList< T >::fireAfterSequenceInserted(), bpp::EdSymbolList< T >::fireAfterSequenceSubstituted(), bpp::EdSymbolList< T >::fireBeforeSequenceChanged(), bpp::EdSymbolList< T >::fireBeforeSequenceDeleted(), bpp::EdSymbolList< T >::fireBeforeSequenceInserted(), bpp::EdSymbolList< T >::fireBeforeSequenceSubstituted(), bpp::EdSymbolList< T >::operator=(), and bpp::EdSymbolList< T >::propagateEvents().