5 #ifndef BPP_SEQ_CONTAINER_SEQUENCECONTAINER_H
6 #define BPP_SEQ_CONTAINER_SEQUENCECONTAINER_H
10 #include "../Sequence.h"
11 #include "../ProbabilisticSequence.h"
29 template<
class SequenceType,
class HashType = std::
string>
99 virtual const typename SequenceType::ElementType&
valueAt(
const HashType&
sequenceKey,
size_t sitePosition)
const = 0;
108 virtual typename SequenceType::ElementType&
valueAt(
const HashType&
sequenceKey,
size_t sitePosition) = 0;
125 virtual const SequenceType&
sequence(
size_t sequencePosition)
const override = 0;
134 virtual void setSequence(
size_t sequencePosition, std::unique_ptr<SequenceType>& sequencePtr) = 0;
144 virtual void setSequence(
size_t sequencePosition, std::unique_ptr<SequenceType>& sequencePtr,
const HashType&
sequenceKey) = 0;
160 virtual std::unique_ptr<SequenceType>
removeSequence(
size_t sequencePosition) = 0;
169 virtual const typename SequenceType::ElementType&
valueAt(
size_t sequencePosition,
size_t sitePosition)
const = 0;
178 virtual typename SequenceType::ElementType&
valueAt(
size_t sequencePosition,
size_t sitePosition) = 0;
void operator()(T *ptr) const
The SequenceContainer interface.
virtual void addSequence(const HashType &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr)=0
Add a sequence to the container.
virtual const SequenceType::ElementType & valueAt(const HashType &sequenceKey, size_t sitePosition) const =0
Get the content of the dataset at a specific position (sequence key, site position).
virtual void setSequence(size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr)=0
Replace a sequence in the container.
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).
virtual std::unique_ptr< SequenceType > removeSequence(size_t sequencePosition)=0
Remove a sequence from the container.
virtual TemplateSequenceContainerInterface< SequenceType, HashType > * createEmptyContainer() const override=0
Return a copy of this container, but with no data inside.
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).
virtual std::unique_ptr< SequenceType > removeSequence(const HashType &sequenceKey)=0
Remove a sequence from the container.
virtual void insertSequence(size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const HashType &sequenceKey)=0
Insert a sequence in the container.
virtual void setSequence(size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const HashType &sequenceKey)=0
Replace a sequence in the container.
virtual SequenceType::ElementType & valueAt(const HashType &sequenceKey, size_t sitePosition)=0
Get the content of the dataset at a specific position (sequence key, site position).
virtual ~TemplateSequenceContainerInterface()
virtual void setSequence(const HashType &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr)=0
Replace a sequence in the container.
TemplateSequenceContainerInterface()
virtual const SequenceType & sequence(const HashType &sequenceKey) const override=0
Retrieve a sequence object from the container.
virtual const SequenceType & sequence(size_t sequencePosition) const override=0
Retrieve a sequence object from the container.
The SequenceData interface.
virtual const std::string & sequenceKey(size_t sequencePosition) const=0
Get the key associated to a given sequence.
This alphabet is used to deal NumericAlphabet.