bpp-seq3  3.0.0
bpp::SequencedValuesContainer Class Referenceabstract

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

+ Inheritance diagram for bpp::SequencedValuesContainer:
+ Collaboration diagram for bpp::SequencedValuesContainer:

Public Member Functions

virtual const AlphabetgetAlphabet () const =0
 Get container's alphabet. More...
 
virtual std::string toString (const std::string &name) const =0
 Convert a particular sequence to a string. More...
 
virtual bool hasSequence (const std::string &name) const =0
 Check if a sequence with a given name is present in the container. More...
 
virtual size_t getNumberOfSequences () const =0
 Get the number of sequences in the container. More...
 
virtual std::vector< std::string > getSequenceNames () const =0
 Get all the names of the sequences in the container. More...
 
virtual void setSequenceNames (const std::vector< std::string > &names, bool checkNames)=0
 Set all sequence names. More...
 
virtual double getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const =0
 get value of a state in a position More...
 
virtual double operator() (size_t siteIndex, const std::string &sequenceName, int state) const =0
 
virtual const CommentsgetComments (const std::string &name) const =0
 Get comments of a particular sequence. More...
 
virtual void setComments (const std::string &name, const Comments &comments)=0
 Set the comments of a particular sequence. More...
 
virtual const CommentsgetGeneralComments () const =0
 Get the comments of this container. More...
 
virtual void setGeneralComments (const Comments &comments)=0
 Set the comments of this container. More...
 
virtual void deleteGeneralComments ()=0
 Delete the comments associated to this container. More...
 
virtual void clear ()=0
 Delete all data in the container. More...
 
virtual SequencedValuesContainercreateEmptyContainer () const =0
 Return a copy of this container, but with no data inside. More...
 
virtual Clonableclone () const=0
 

Detailed Description

Definition at line 30 of file SequencedValuesContainer.h.

Member Function Documentation

◆ clear()

virtual void bpp::SequencedValuesContainer::clear ( )
pure virtual

Delete all data in the container.

◆ createEmptyContainer()

virtual SequencedValuesContainer* bpp::SequencedValuesContainer::createEmptyContainer ( ) const
pure virtual

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

This method creates a new SequencedValuesContainer object. The class of this container depends on the derivative class.

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

◆ deleteGeneralComments()

virtual void bpp::SequencedValuesContainer::deleteGeneralComments ( )
pure virtual

Delete the comments associated to this container.

◆ getAlphabet()

virtual const Alphabet* bpp::SequencedValuesContainer::getAlphabet ( ) const
pure virtual

Get container's alphabet.

Returns
The alphabet associated to this container.

◆ getComments()

virtual const Comments& bpp::SequencedValuesContainer::getComments ( const std::string &  name) const
pure virtual

Get comments of a particular sequence.

Parameters
nameThe name of the sequence.
Returns
The comments associated to sequence with name 'name'.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

◆ getGeneralComments()

virtual const Comments& bpp::SequencedValuesContainer::getGeneralComments ( ) const
pure virtual

Get the comments of this container.

Returns
The comments associated to this container.

◆ getNumberOfSequences()

virtual size_t bpp::SequencedValuesContainer::getNumberOfSequences ( ) const
pure virtual

Get the number of sequences in the container.

Returns
The number of sequences in the container.

◆ getSequenceNames()

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

Get all the names of the sequences in the container.

Returns
A vector of strings with all sequence names.

◆ getStateValueAt()

virtual double bpp::SequencedValuesContainer::getStateValueAt ( size_t  siteIndex,
const std::string &  sequenceName,
int  state 
) const
pure virtual

get value of a state in a position

Parameters
siteIndexindex of the site
sequenceNamename of the sequence in the container
statestate in the alphabet

◆ hasSequence()

virtual bool bpp::SequencedValuesContainer::hasSequence ( const std::string &  name) const
pure virtual

Check if a sequence with a given name is present in the container.

Parameters
nameThe name of the sequence.
Returns
True if a sequence with the given name is present in the container.

◆ operator()()

virtual double bpp::SequencedValuesContainer::operator() ( size_t  siteIndex,
const std::string &  sequenceName,
int  state 
) const
pure virtual

◆ setComments()

virtual void bpp::SequencedValuesContainer::setComments ( const std::string &  name,
const Comments comments 
)
pure virtual

Set the comments of a particular sequence.

Parameters
nameThe name of the sequence.
commentsThe comments to set to sequence with name 'name'.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

◆ setGeneralComments()

virtual void bpp::SequencedValuesContainer::setGeneralComments ( const Comments comments)
pure virtual

Set the comments of this container.

Parameters
commentsThe comments to be associated to this container.

◆ setSequenceNames()

virtual void bpp::SequencedValuesContainer::setSequenceNames ( const std::vector< std::string > &  names,
bool  checkNames 
)
pure virtual

Set all sequence names.

Parameters
namesA vector of strings with all sequence names. Its size must be strictly equal to the the size of the container (the number of sequences).
checkNamesTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions
ExceptionIf there are redundant names in the input vector.

◆ toString()

virtual std::string bpp::SequencedValuesContainer::toString ( const std::string &  name) const
pure virtual

Convert a particular sequence to a string.

Parameters
nameThe name of the sequence.
Returns
A string describing the content of the sequence.
Exceptions
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

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