bpp-seq3  3.0.0
bpp::AbstractTemplateSequenceContainer< SequenceType, HashType > Class Template Referenceabstract

Partial implementation of the SequenceContainer interface. More...

#include <Bpp/Seq/Container/AbstractSequenceContainer.h>

+ Inheritance diagram for bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >:
+ Collaboration diagram for bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >:

Public Member Functions

 AbstractTemplateSequenceContainer (std::shared_ptr< const Alphabet > alphabet)
 This constructor initializes the alphabet pointer. More...
 
 AbstractTemplateSequenceContainer (std::shared_ptr< const Alphabet > alphabet, const Comments &comments)
 This constructor initializes the alphabet pointer and the comments field. More...
 
 AbstractTemplateSequenceContainer (const AbstractTemplateSequenceContainer< SequenceType, HashType > &sc)
 
AbstractTemplateSequenceContaineroperator= (const AbstractTemplateSequenceContainer< SequenceType, HashType > &sc)
 
 AbstractTemplateSequenceContainer (const TemplateSequenceContainerInterface< SequenceType, HashType > &sc)
 Copy constructor from any SequenceContainer object. More...
 
AbstractTemplateSequenceContaineroperator= (const TemplateSequenceContainerInterface< SequenceType, HashType > &sc)
 Assignation operator from any SequenceContainer object. More...
 
virtual ~AbstractTemplateSequenceContainer ()
 
const Alphabetalphabet () const override
 Get the container's alphabet. More...
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 Get a pointer toward the container's alphabet. More...
 
virtual TemplateSequenceContainerInterface< SequenceType, std::string > * createEmptyContainer () const override=0
 Return a copy of this container, but with no data inside. More...
 
TemplateSequenceDataInterface< std::string > * clone () const override=0
 
virtual size_t getNumberOfSequences () const=0
 Get the number of sequences in the container. More...
 
virtual std::vector< std::string > getSequenceKeys () const=0
 
virtual void setSequenceKeys (const std::vector< std::string > &sequenceKeys)=0
 Reset all sequence keys. More...
 
virtual double getStateValueAt (size_t sitePosition, const std::string &sequenceKey, int state) const=0
 Get the value of a state at a given position. More...
 
virtual double getStateValueAt (size_t sitePosition, size_t sequencePosition, int state) const=0
 Get value of a state at a given position. More...
 
virtual double operator() (size_t sitePosition, const std::string &sequenceKey, int state) const=0
 Get the value of a state at a given position. More...
 
virtual double operator() (size_t sitePosition, size_t sequencePosition, int state) const=0
 Get the value of a state at a given position. More...
 
virtual void clear ()=0
 Delete all data in the container. More...
 
virtual bool hasSequence (const std::string &sequenceKey) const=0
 Check if a certain key is associated to a sequence in the container. More...
 
virtual const CommentsgetComments () const =0
 Get the comments. More...
 
virtual void setComments (const Comments &comments)=0
 Set the comments. More...
 
virtual void clearComments ()=0
 
const CommentsgetComments () const override
 Get the comments. More...
 
void setComments (const Comments &comments) override
 Set the comments. More...
 
void clearComments () override
 
Access by key
virtual const SequenceType & sequence (const std::string &sequenceKey) const override=0
 Retrieve a sequence object from the container. More...
 
virtual void setSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr)=0
 Replace a sequence in the container. More...
 
virtual void addSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr)=0
 Add a sequence to the container. More...
 
virtual std::unique_ptr< SequenceType > removeSequence (const std::string &sequenceKey)=0
 Remove a sequence from the container. More...
 
virtual const SequenceType::ElementType & valueAt (const std::string &sequenceKey, size_t sitePosition) const=0
 Get the content of the dataset at a specific position (sequence key, site position). More...
 
virtual SequenceType::ElementType & valueAt (const std::string &sequenceKey, size_t sitePosition)=0
 Get the content of the dataset at a specific position (sequence key, site position). More...
 
Access by position
virtual const SequenceType & sequence (size_t sequencePosition) const override=0
 Retrieve a sequence object from the container. More...
 
virtual void setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr)=0
 Replace a sequence in the container. More...
 
virtual void setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const std::string &sequenceKey)=0
 Replace a sequence in the container. More...
 
virtual std::unique_ptr< SequenceType > removeSequence (size_t sequencePosition)=0
 Remove a sequence from the container. More...
 
virtual const SequenceType::ElementType & valueAt (size_t sequencePosition, size_t sitePosition) const=0
 Get the content of the dataset at a specific position (sequence position, site position). More...
 
virtual SequenceType::ElementType & valueAt (size_t sequencePosition, size_t sitePosition)=0
 Get the content of the dataset at a specific position (sequence position, site position). More...
 
virtual void insertSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const std::string &sequenceKey)=0
 Insert a sequence in the container. More...
 
Access by key
virtual void deleteSequence (const std::string &sequenceKey)=0
 Remove and delete a sequence from the container. More...
 
Access by position
virtual void deleteSequence (size_t sequencePosition)=0
 Remove and delete a sequence from the container. More...
 
Index management

Position to key and key to position.

virtual const std::string & sequenceKey (size_t sequencePosition) const=0
 Get the key associated to a given sequence. More...
 
virtual size_t getSequencePosition (const std::string &sequenceKey) const=0
 Get the position of a sequence with a given key in the container. More...
 
Access sequence names
virtual std::vector< std::string > getSequenceNames () const=0
 
virtual void setSequenceNames (const std::vector< std::string > &names, bool updateKeys)=0
 Batch-set all sequence names. More...
 
virtual std::vector< CommentsgetSequenceComments () const=0
 

Protected Attributes

std::shared_ptr< const Alphabetalphabet_
 The container's alphabet. More...
 
Comments comments_
 

Detailed Description

template<class SequenceType, class HashType = std::string>
class bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >

Partial implementation of the SequenceContainer interface.

This abstract class provides an alphabet and comments, with associated methods.

Definition at line 23 of file AbstractSequenceContainer.h.

Constructor & Destructor Documentation

◆ AbstractTemplateSequenceContainer() [1/4]

template<class SequenceType , class HashType = std::string>
bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::AbstractTemplateSequenceContainer ( std::shared_ptr< const Alphabet alphabet)
inline

This constructor initializes the alphabet pointer.

This constructor is to be called by constructors of derived classes.

Parameters
alphabetThe alphabet to be associated to this container.

Definition at line 41 of file AbstractSequenceContainer.h.

◆ AbstractTemplateSequenceContainer() [2/4]

template<class SequenceType , class HashType = std::string>
bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::AbstractTemplateSequenceContainer ( std::shared_ptr< const Alphabet alphabet,
const Comments comments 
)
inline

This constructor initializes the alphabet pointer and the comments field.

This constructor is to be called by constructors of derived classes.

Parameters
alphabetThe alphabet to be associated to this container.
commentsGeneral comments to be associated to this container.

Definition at line 53 of file AbstractSequenceContainer.h.

◆ AbstractTemplateSequenceContainer() [3/4]

template<class SequenceType , class HashType = std::string>
bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::AbstractTemplateSequenceContainer ( const AbstractTemplateSequenceContainer< SequenceType, HashType > &  sc)
inline

Definition at line 58 of file AbstractSequenceContainer.h.

◆ AbstractTemplateSequenceContainer() [4/4]

template<class SequenceType , class HashType = std::string>
bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::AbstractTemplateSequenceContainer ( const TemplateSequenceContainerInterface< SequenceType, HashType > &  sc)
inline

Copy constructor from any SequenceContainer object.

Parameters
scAnother sequence container.

Definition at line 74 of file AbstractSequenceContainer.h.

◆ ~AbstractTemplateSequenceContainer()

template<class SequenceType , class HashType = std::string>
virtual bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::~AbstractTemplateSequenceContainer ( )
inlinevirtual

Definition at line 92 of file AbstractSequenceContainer.h.

Member Function Documentation

◆ addSequence()

virtual void bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::addSequence ( const std::string &  sequenceKey,
std::unique_ptr< SequenceType > &  sequencePtr 
)
pure virtualinherited

Add a sequence to the container.

Similar to setSequence, with the exception that an Exception will be raised in case of an existing key. Existing sequences will not be updated, only new ones will be appended.

Parameters
sequenceKeyThe key to which the sequence is associated.
sequencePtrThe sequence to add.

Implemented in bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSiteContainer< SiteType, SequenceType >.

◆ alphabet()

template<class SequenceType , class HashType = std::string>
const Alphabet& bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::alphabet ( ) const
inlineoverridevirtual

Get the container's alphabet.

Returns
The alphabet associated to this container.

Implements bpp::TemplateSequenceDataInterface< std::string >.

Definition at line 95 of file AbstractSequenceContainer.h.

References bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::alphabet_.

◆ clear()

◆ clearComments() [1/2]

void bpp::SimpleCommentable::clearComments ( )
inlineoverridevirtualinherited

Implements bpp::Commentable.

Definition at line 88 of file Commentable.h.

References bpp::SimpleCommentable::comments_.

◆ clearComments() [2/2]

virtual void bpp::Commentable::clearComments ( )
pure virtualinherited

Implemented in bpp::SimpleCommentable.

◆ clone()

◆ createEmptyContainer()

virtual TemplateSequenceContainerInterface<SequenceType, std::string >* bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::createEmptyContainer ( ) const
overridepure virtualinherited

Return a copy of this container, but with no data inside.

This method creates a new SequencedContainer object. The class of this container depends on the class implementing this interface.

Returns
A new empty container, with the same alphabet as this one.

Implements bpp::TemplateSequenceDataInterface< std::string >.

Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.

◆ deleteSequence() [1/2]

virtual void bpp::TemplateSequenceDataInterface< std::string >::deleteSequence ( const std::string &  sequenceKey)
pure virtualinherited

Remove and delete a sequence from the container.

Parameters
sequenceKeyThe key to which the sequence is associated.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ deleteSequence() [2/2]

virtual void bpp::TemplateSequenceDataInterface< std::string >::deleteSequence ( size_t  sequencePosition)
pure virtualinherited

Remove and delete a sequence from the container.

Parameters
sequencePositionThe position of the sequence.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ getAlphabet()

template<class SequenceType , class HashType = std::string>
std::shared_ptr<const Alphabet> bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::getAlphabet ( ) const
inlineoverridevirtual

Get a pointer toward the container's alphabet.

Returns
A pointer toward the alphabet associated to this container.

Implements bpp::TemplateSequenceDataInterface< std::string >.

Definition at line 101 of file AbstractSequenceContainer.h.

References bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::alphabet_.

◆ getComments() [1/2]

◆ getComments() [2/2]

◆ getNumberOfSequences()

virtual size_t bpp::TemplateSequenceDataInterface< std::string >::getNumberOfSequences ( ) const
pure virtualinherited

Get the number of sequences in the container.

Returns
The number of sequences in the container.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ getSequenceComments()

virtual std::vector<Comments> bpp::TemplateSequenceDataInterface< std::string >::getSequenceComments ( ) const
pure virtualinherited

◆ getSequenceKeys()

virtual std::vector<std::string > bpp::TemplateSequenceDataInterface< std::string >::getSequenceKeys ( ) const
pure virtualinherited

◆ getSequenceNames()

virtual std::vector<std::string> bpp::TemplateSequenceDataInterface< std::string >::getSequenceNames ( ) const
pure virtualinherited

◆ getSequencePosition()

virtual size_t bpp::TemplateSequenceDataInterface< std::string >::getSequencePosition ( const std::string &  sequenceKey) const
pure virtualinherited

Get the position of a sequence with a given key in the container.

Parameters
sequenceKeyThe key to which the sequence is associated.
Returns
The position of the sequence with name 'name', if it exists.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ getStateValueAt() [1/2]

virtual double bpp::TemplateSequenceDataInterface< std::string >::getStateValueAt ( size_t  sitePosition,
const std::string &  sequenceKey,
int  state 
) const
pure virtualinherited

Get the value of a state at a given position.

Parameters
sitePositionindex of the site
sequenceKeykey of the sequence in the container
statestate in the alphabet

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ getStateValueAt() [2/2]

virtual double bpp::TemplateSequenceDataInterface< std::string >::getStateValueAt ( size_t  sitePosition,
size_t  sequencePosition,
int  state 
) const
pure virtualinherited

Get value of a state at a given position.

Parameters
sitePositionindex of the site
sequencePositionindex of the sequence in the container
statestate in the alphabet

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ hasSequence()

virtual bool bpp::TemplateSequenceDataInterface< std::string >::hasSequence ( const std::string &  sequenceKey) const
pure virtualinherited

Check if a certain key is associated to a sequence in the container.

Parameters
sequenceKeyThe key to which the sequence is associated.
Returns
True if the key was found in the contained.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ insertSequence()

virtual void bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::insertSequence ( size_t  sequencePosition,
std::unique_ptr< SequenceType > &  sequencePtr,
const std::string &  sequenceKey 
)
pure virtualinherited

Insert a sequence in the container.

Parameters
sequencePositionThe position of the sequence.
sequencePtrThe sequence to add.
sequenceKeyThe new key of the sequence.

Implemented in bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSiteContainer< SiteType, SequenceType >.

◆ operator()() [1/2]

virtual double bpp::TemplateSequenceDataInterface< std::string >::operator() ( size_t  sitePosition,
const std::string &  sequenceKey,
int  state 
) const
pure virtualinherited

Get the value of a state at a given position.

Same as getValueAt.

Parameters
sitePositionindex of the site
sequenceKeykey of the sequence in the container
statestate in the alphabet

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ operator()() [2/2]

virtual double bpp::TemplateSequenceDataInterface< std::string >::operator() ( size_t  sitePosition,
size_t  sequencePosition,
int  state 
) const
pure virtualinherited

Get the value of a state at a given position.

Same as getValueAt.

Parameters
sitePositionindex of the site
sequencePositionindex of the sequence in the container
statestate in the alphabet

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ operator=() [1/2]

◆ operator=() [2/2]

template<class SequenceType , class HashType = std::string>
AbstractTemplateSequenceContainer& bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator= ( const TemplateSequenceContainerInterface< SequenceType, HashType > &  sc)
inline

◆ removeSequence() [1/2]

virtual std::unique_ptr<SequenceType> bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::removeSequence ( const std::string &  sequenceKey)
pure virtualinherited

Remove a sequence from the container.

Parameters
sequenceKeyThe key to which the sequence is associated.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ removeSequence() [2/2]

virtual std::unique_ptr<SequenceType> bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::removeSequence ( size_t  sequencePosition)
pure virtualinherited

Remove a sequence from the container.

Parameters
sequencePositionThe position of the sequence.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ sequence() [1/2]

virtual const SequenceType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::sequence ( const std::string &  sequenceKey) const
overridepure virtualinherited

Retrieve a sequence object from the container.

Parameters
sequenceKeyThe key to which the sequence is associated.
Returns
A reference toward the Sequence with corresponding name.

Implements bpp::TemplateSequenceDataInterface< std::string >.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ sequence() [2/2]

virtual const SequenceType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::sequence ( size_t  sequencePosition) const
overridepure virtualinherited

Retrieve a sequence object from the container.

Parameters
sequencePositionThe position of the sequence.
Returns
A reference toward the Sequence object with corresponding name.

Implements bpp::TemplateSequenceDataInterface< std::string >.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ sequenceKey()

virtual const std::string & bpp::TemplateSequenceDataInterface< std::string >::sequenceKey ( size_t  sequencePosition) const
pure virtualinherited

Get the key associated to a given sequence.

Parameters
sequencePositionThe position of the sequence in the container.
Returns
The key to which the sequence is associated.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ setComments() [1/2]

◆ setComments() [2/2]

virtual void bpp::Commentable::setComments ( const Comments comments)
pure virtualinherited

◆ setSequence() [1/3]

virtual void bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::setSequence ( const std::string &  sequenceKey,
std::unique_ptr< SequenceType > &  sequencePtr 
)
pure virtualinherited

Replace a sequence in the container.

If a sequence is found with the given key, it will be updated with the new one. If no sequence with the given key is found, the new sequence will be added to the container.

Parameters
sequenceKeyThe key to which the sequence is associated.
sequencePtrThe sequence to set.

Implemented in bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSiteContainer< SiteType, SequenceType >.

◆ setSequence() [2/3]

virtual void bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::setSequence ( size_t  sequencePosition,
std::unique_ptr< SequenceType > &  sequencePtr 
)
pure virtualinherited

Replace a sequence in the container.

The original key associated to the sequence will be kept.

Parameters
sequencePositionThe position of the sequence.
sequencePtrThe sequence to add.

Implemented in bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSiteContainer< SiteType, SequenceType >.

◆ setSequence() [3/3]

virtual void bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::setSequence ( size_t  sequencePosition,
std::unique_ptr< SequenceType > &  sequencePtr,
const std::string &  sequenceKey 
)
pure virtualinherited

Replace a sequence in the container.

The original key associated to the sequence will be kept.

Parameters
sequencePositionThe position of the sequence.
sequencePtrThe sequence to add.
sequenceKeyThe new key of the sequence.

Implemented in bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSiteContainer< SiteType, SequenceType >.

◆ setSequenceKeys()

virtual void bpp::TemplateSequenceDataInterface< std::string >::setSequenceKeys ( const std::vector< std::string > &  sequenceKeys)
pure virtualinherited

◆ setSequenceNames()

virtual void bpp::TemplateSequenceDataInterface< std::string >::setSequenceNames ( const std::vector< std::string > &  names,
bool  updateKeys 
)
pure virtualinherited

Batch-set all sequence names.

Parameters
namesA vector of sequence names. Must be the same size as the number of sequences in the container, otherwise a DimensionException is thrown.
updateKeysTell whether the keys of the sequences should be updated with the new sequence names.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.

◆ valueAt() [1/4]

virtual const SequenceType::ElementType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::valueAt ( const std::string &  sequenceKey,
size_t  sitePosition 
) const
pure virtualinherited

Get the content of the dataset at a specific position (sequence key, site position).

Parameters
sequenceKeykey of the sequence in the container
sitePositionindex of the site
Returns
The element at the given position.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ valueAt() [2/4]

virtual SequenceType::ElementType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::valueAt ( const std::string &  sequenceKey,
size_t  sitePosition 
)
pure virtualinherited

Get the content of the dataset at a specific position (sequence key, site position).

Parameters
sequenceKeykey of the sequence in the container
sitePositionindex of the site
Returns
The element at the given position.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ valueAt() [3/4]

virtual const SequenceType::ElementType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::valueAt ( size_t  sequencePosition,
size_t  sitePosition 
) const
pure virtualinherited

Get the content of the dataset at a specific position (sequence position, site position).

Parameters
sequencePositionindex of the sequence in the container
sitePositionindex of the site
Returns
The element at the given position.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, and bpp::TemplateVectorSequenceContainer< SequenceType >.

◆ valueAt() [4/4]

virtual SequenceType::ElementType& bpp::TemplateSequenceContainerInterface< SequenceType, std::string >::valueAt ( size_t  sequencePosition,
size_t  sitePosition 
)
pure virtualinherited

Get the content of the dataset at a specific position (sequence position, site position).

Parameters
sequencePositionindex of the sequence in the container
sitePositionindex of the site
Returns
The element at the given position.

Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.

Member Data Documentation

◆ alphabet_

template<class SequenceType , class HashType = std::string>
std::shared_ptr<const Alphabet> bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::alphabet_
protected

◆ comments_


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