5 #ifndef BPP_SEQ_CONTAINER_SEQUENCEDATA_H
6 #define BPP_SEQ_CONTAINER_SEQUENCEDATA_H
10 #include "../Alphabet/Alphabet.h"
11 #include "../Commentable.h"
12 #include "../CoreSequence.h"
26 template<
class HashType = std::
string>
50 virtual std::shared_ptr<const Alphabet>
getAlphabet()
const = 0;
96 virtual double getStateValueAt(
size_t sitePosition,
size_t sequencePosition,
int state)
const = 0;
107 virtual double operator()(
size_t sitePosition,
size_t sequencePosition,
int state)
const = 0;
195 virtual const HashType&
sequenceKey(
size_t sequencePosition)
const = 0;
The core sequence interface.
The SequenceData interface.
virtual ~TemplateSequenceDataInterface()
virtual void deleteSequence(const HashType &sequenceKey)=0
Remove and delete a sequence from the container.
virtual std::vector< Comments > getSequenceComments() const =0
virtual bool hasSequence(const HashType &sequenceKey) const =0
Check if a certain key is associated to a sequence in the container.
virtual double getStateValueAt(size_t sitePosition, size_t sequencePosition, int state) const =0
Get value of a state at a given position.
virtual TemplateSequenceDataInterface< HashType > * createEmptyContainer() const =0
Return a copy of this container, but with no data inside.
virtual void setSequenceNames(const std::vector< std::string > &names, bool updateKeys)=0
Batch-set all sequence names.
virtual void clear()=0
Delete all data in the container.
virtual std::vector< std::string > getSequenceNames() const =0
virtual double operator()(size_t sitePosition, size_t sequencePosition, int state) const =0
Get the value of a state at a given position.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences in the container.
virtual double operator()(size_t sitePosition, const HashType &sequenceKey, int state) const =0
Get the value of a state at a given position.
virtual const CoreSequenceInterface & sequence(size_t sequencePosition) const =0
Retrieve a sequence object from the container.
virtual const HashType & sequenceKey(size_t sequencePosition) const =0
Get the key associated to a given sequence.
virtual std::vector< HashType > getSequenceKeys() const =0
virtual double getStateValueAt(size_t sitePosition, const HashType &sequenceKey, int state) const =0
Get the value of a state at a given position.
virtual const CoreSequenceInterface & sequence(const HashType &sequenceKey) const =0
Retrieve a sequence object from the container.
TemplateSequenceDataInterface()
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Get a pointer toward the container's alphabet.
virtual void setSequenceKeys(const std::vector< HashType > &sequenceKeys)=0
Reset all sequence keys.
virtual void deleteSequence(size_t sequencePosition)=0
Remove and delete a sequence from the container.
virtual const Alphabet & alphabet() const =0
Get the container's alphabet.
TemplateSequenceDataInterface< HashType > * clone() const override=0
virtual size_t getSequencePosition(const HashType &sequenceKey) const =0
Get the position of a sequence with a given key in the container.
This alphabet is used to deal NumericAlphabet.