vg
tools for working with variation graphs
|
#include <zip_code_tree.hpp>
Public Member Functions | |
iterator (vector< tree_item_t >::const_iterator begin, vector< tree_item_t >::const_iterator end) | |
Make an iterator wrapping the given iterator, until the given end. More... | |
iterator (const iterator &other)=default | |
iterator (iterator &&other)=default | |
iterator & | operator= (const iterator &other)=default |
iterator & | operator= (iterator &&other)=default |
iterator & | operator++ () |
Advance right. More... | |
bool | operator== (const iterator &other) const |
Compare for equality to see if we hit end. More... | |
bool | operator!= (const iterator &other) const |
Compare for inequality. More... | |
oriented_seed_t | operator* () const |
Get the index and orientation of the seed we are currently at. More... | |
size_t | remaining_tree () const |
Private Attributes | |
vector< tree_item_t >::const_iterator | it |
Where we are in the stored tree. More... | |
vector< tree_item_t >::const_iterator | end |
Where the stored tree ends. We keep this to avoid needing a reference back to the ZipCodeTree. More... | |
Iterator that visits all seeds right to left in the tree's in-order traversal.
vg::ZipCodeTree::iterator::iterator | ( | vector< tree_item_t >::const_iterator | begin, |
vector< tree_item_t >::const_iterator | end | ||
) |
Make an iterator wrapping the given iterator, until the given end.
|
default |
|
default |
|
inline |
Compare for inequality.
auto vg::ZipCodeTree::iterator::operator* | ( | ) | const |
Get the index and orientation of the seed we are currently at.
auto vg::ZipCodeTree::iterator::operator++ | ( | ) |
Advance right.
auto vg::ZipCodeTree::iterator::operator== | ( | const iterator & | other | ) | const |
Compare for equality to see if we hit end.
auto vg::ZipCodeTree::iterator::remaining_tree | ( | ) | const |
Get the number of tree storage slots left in the iterator. We need this to make reverse iterators from forward ones.
|
private |
Where the stored tree ends. We keep this to avoid needing a reference back to the ZipCodeTree.
|
private |
Where we are in the stored tree.