Go to the documentation of this file. 1 #ifndef BIFROST_NEIGHBOR_ITERATOR_HPP
2 #define BIFROST_NEIGHBOR_ITERATOR_HPP
12 template<
typename U,
typename G,
bool is_const>
class UnitigMap;
33 template<
typename Unitig_data_t =
void,
typename Graph_data_t =
void,
bool is_const = false>
34 class neighborIterator :
public std::iterator<std::input_iterator_tag, UnitigMap<Unitig_data_t, Graph_data_t, is_const>, int> {
36 typedef Unitig_data_t U;
37 typedef Graph_data_t G;
41 typedef typename std::conditional<is_const, const CompactedDBG<U, G>*,
CompactedDBG<U, G>*>::type CompactedDBG_ptr_t;
103 CompactedDBG_ptr_t cdbg;
115 template<
typename Unitig_data_t =
void,
typename Graph_data_t =
void,
bool is_const = false>
118 typedef Unitig_data_t U;
119 typedef Graph_data_t G;
133 size_t cardinality()
const;
161 template<
typename Unitig_data_t =
void,
typename Graph_data_t =
void,
bool is_const = false>
164 typedef Unitig_data_t U;
165 typedef Graph_data_t G;
179 size_t cardinality()
const;
198 #include "NeighborIterator.tcc"
neighborIterator(const neighborIterator &o)
Copy constructor.
const UnitigMap< U, G, is_const > * operator->() const
Dereference operator.
Interface to store and manipulate k-mers.
Definition: Kmer.hpp:42
neighborIterator< U, G, is_const > end() const
Return an iterator over the past-the-last successor of a reference unitig.
neighborIterator & operator++()
Prefix increment, iterate over the next neighbor (predecessor or successor).
bool hasSuccessors() const
Check if the unitig has at least one successor.
Contain all the information for the mapping of a k-mer or a sequence to a unitig of a Compacted de Br...
Definition: UnitigMap.hpp:92
Wrapper for class neighborIterator to iterate over the predecessors of a reference unitig used in a U...
Definition: NeighborIterator.hpp:116
bool hasPredecessors() const
Check if the unitig has at least one predecessor.
neighborIterator< U, G, is_const > begin() const
Return an iterator over the predecessors of a reference unitig.
neighborIterator operator++(int)
Postfix increment, iterate over the next neighbor (predecessor or successor).
Wrapper for class neighborIterator to iterate over the predecessors of a reference unitig used in a U...
Definition: NeighborIterator.hpp:162
bool operator!=(const neighborIterator &o) const
Inequality operator: check if two neighborIterator are different.
neighborIterator()
Constructor.
Iterator for the neighbors (predecessors or successors) of a reference unitig used in a UnitigMap obj...
Definition: NeighborIterator.hpp:34
const UnitigMap< U, G, is_const > & operator*() const
Indirection operator.
neighborIterator(const UnitigMap< U, G, is_const > &um_, const bool is_forward_)
Constructor.
ForwardCDBG(const UnitigMap< U, G, is_const > &um_)
Constructor.
Interface for the class Kmer:
bool operator==(const neighborIterator &o) const
Equality operator: check if two neighborIterator are the same.
BackwardCDBG(const UnitigMap< U, G, is_const > &um_)
Constructor.
neighborIterator< U, G, is_const > begin() const
Return an iterator over the successors of a reference unitig.
Represent a Compacted de Bruijn graph.
Definition: CompactedDBG.hpp:313
neighborIterator< U, G, is_const > end() const
Return an iterator over the past-the-last predecessor of a reference unitig.