5 #ifndef BPP_SEQ_CONTAINER_SITECONTAINERITERATOR_H
6 #define BPP_SEQ_CONTAINER_SITECONTAINERITERATOR_H
9 #include "../SiteIterator.h"
10 #include "../SiteTools.h"
18 template<
class SiteType,
class SequenceType,
class HashType>
55 template<
class SiteType,
class SequenceType,
class HashType>
91 template<
class SiteType,
class SequenceType,
class HashType>
119 return currentPosition_ < static_cast<long int>(
sites_->getNumberOfSites());
124 size_t position =
static_cast<size_t>(current + 1);
127 return static_cast<int>(position);
132 long int position = current - 1;
143 template<
class SiteType,
class SequenceType,
class HashType>
171 return currentPosition_ < static_cast<int>(
sites_->getNumberOfSites());
176 size_t position =
static_cast<size_t>(current + 1);
179 return static_cast<int>(position);
184 long int position = current - 1;
Partial implementation of the SiteIterator interface, allowing to loop over a site container.
AbstractTemplateSiteContainerIterator(const AbstractTemplateSiteContainerIterator< SiteType, SequenceType, HashType > &atsi)
const TemplateSiteContainerInterface< SiteType, SequenceType, HashType > * sites_
long int currentPosition_
virtual ~AbstractTemplateSiteContainerIterator()
AbstractTemplateSiteContainerIterator & operator=(const AbstractTemplateSiteContainerIterator< SiteType, SequenceType, HashType > &atsi)
AbstractTemplateSiteContainerIterator(const TemplateSiteContainerInterface< SiteType, SequenceType, HashType > &sites)
Loop over all complete sites in a SiteContainer (i.e. sites without gap and unresolved characters).
virtual ~CompleteTemplateSiteContainerIterator()
long int previousCompleteSitePosition(long int current) const
CompleteTemplateSiteContainerIterator(const TemplateSiteContainerInterface< SiteType, SequenceType, HashType > &sites)
bool hasMoreSites() const override
long int nextCompleteSitePosition(long int current) const
const SiteType & nextSite() override
Loop over all sites without gaps in a SiteContainer.
const SiteType & nextSite() override
NoGapTemplateSiteContainerIterator(const TemplateSiteContainerInterface< SiteType, SequenceType, HashType > &sites)
long int nextSiteWithoutGapPosition(int current) const
bool hasMoreSites() const override
long int previousSiteWithoutGapPosition(int current) const
virtual ~NoGapTemplateSiteContainerIterator()
Loop over all sites in a SiteContainer.
SimpleTemplateSiteContainerIterator(const TemplateSiteContainerInterface< SiteType, SequenceType, HashType > &sites)
bool hasMoreSites() const override
virtual ~SimpleTemplateSiteContainerIterator()
const SiteType & nextSite() override
The SiteContainer interface.
Generic site iterator interface, allowing to loop over sites.
This alphabet is used to deal NumericAlphabet.