41 #ifndef BPP_SEQ_CONTAINER_VECTORPROBABILISTICSITECONTAINER_H
42 #define BPP_SEQ_CONTAINER_VECTORPROBABILISTICSITECONTAINER_H
45 #include "../ProbabilisticSite.h"
153 const std::shared_ptr<ProbabilisticSite>
getSite(
size_t i)
const
161 std::shared_ptr<ProbabilisticSite>
getSite(
size_t i)
231 double getStateValueAt(
size_t siteIndex,
const std::string& sequenceName,
int state)
const
237 double operator()(
size_t siteIndex,
const std::string& sequenceName,
int state)
const
266 double operator()(
size_t siteIndex,
size_t sequenceIndex,
int state)
const
281 void addSite(std::shared_ptr<ProbabilisticSite> site,
bool checkPosition =
false);
Partial implementation of the OrderedSequenceContainer interface.
const Alphabet * getAlphabet() const
Get container's alphabet.
The Container of Aligned Values interface.
virtual size_t getStateIndex(int state) const =0
The OrderedSequenceContainer interface.
The probabilistic sequence interface.
The ProbabilisticSiteContainer interface.
The template VectorMappedContainer class.
const std::shared_ptr< T > getObject(size_t objectIndex) const
Retrieve an object from the container. Set as protected since they will be public under T specific na...
size_t getObjectPosition(const std::string &name) const
Link between position & name.
bool hasObject(const std::string &name) const
Check if a object with a given name is present in the container.
std::vector< std::string > getObjectNames() const
void setObjectNames(const std::vector< std::string > &names)
size_t getSize() const
Get the number of objects in the container.
The template VectorPositionedContainer class.
size_t getSize() const
the size
const std::shared_ptr< T > getObject(size_t objectIndex) const
Retrieve an object from the container. Set as protected since they will be public under T specific na...
void deleteObjects(size_t objectIndex, size_t length)
The VectorProbabilisticSiteContainer class.
Vint getSitePositions() const
Get all position attributes of sites.
void deleteSites(size_t siteIndex, size_t length)
Remove a continuous range of sites in the container.
VectorProbabilisticSiteContainer & operator=(const VectorProbabilisticSiteContainer &vpsc)
void setSequence(const std::string &name, const ProbabilisticSequence &sequence, bool checkName)
Replace a probabilistic sequence in the container.
VectorProbabilisticSiteContainer(const Alphabet *alpha)
Build a new emtpy container.
double operator()(size_t siteIndex, const std::string &sequenceName, int state) const
const ProbabilisticSequence & getSequence(std::size_t i) const
Get Sequence from a position in the container.
double getStateValueAt(size_t siteIndex, const std::string &sequenceName, int state) const
get value of a state in a position
virtual ~VectorProbabilisticSiteContainer()
bool hasSequence(const std::string &name) const
Check if a sequence with a given name is present in the container.
void setComments(size_t sequenceIndex, const Comments &comments)
void addSite(std::shared_ptr< ProbabilisticSite > site, bool checkPosition=false)
Add a site at the end of the container.
size_t getNumberOfSites() const
Get the number of aligned positions in the container.
void reindexSites()
Set all positions attributes.
std::shared_ptr< ProbabilisticSite > getSite(size_t i)
void setSequenceNames(const std::vector< std::string > &names, bool checkNames=true)
Set all sequence names.
void clear()
Delete all objects in the container.
size_t getNumberOfSequences() const
Get the number of sequences in the container.
std::vector< std::string > getSequenceNames() const
Get all the names of the sequences in the container.
const std::shared_ptr< ProbabilisticSite > getSite(size_t i) const
Get a site from the container.
void addSequence(const ProbabilisticSequence &sequence, bool checkName=true)
Add a probabilistic sequence to the container.
double operator()(size_t siteIndex, size_t sequenceIndex, int state) const
double getStateValueAt(size_t siteIndex, size_t sequenceIndex, int state) const
VectorProbabilisticSiteContainer * clone() const
size_t getSequencePosition(const std::string &name) const
Get the position of a sequence in sequence container from its name.
VectorProbabilisticSiteContainer * createEmptyContainer() const
Return a copy of this container, but with no data inside.
void setSitePositions(Vint vPositions)
Set all position attributes of sites.
This alphabet is used to deal NumericAlphabet.
std::vector< std::string > Comments
Declaration of Comments type.