|
vg
tools for working with variation graphs
|
#include <snarls.hpp>
Public Member Functions | |
| ChainIterator & | operator++ () |
| Advance the iterator. More... | |
| pair< const Snarl *, bool > | operator* () const |
| Get the snarl we're at and whether it is backward. More... | |
| const pair< const Snarl *, bool > * | operator-> () const |
| Get a pointer to the thing we get when we dereference the iterator. More... | |
| bool | operator== (const ChainIterator &other) const |
| We need to define comparison because C++ doesn't give it to us for free. More... | |
| bool | operator!= (const ChainIterator &other) const |
Public Attributes | |
| bool | go_left |
| Are we a reverse iterator or not? More... | |
| Chain::const_iterator | pos |
| What position in the underlying vector are we in? More... | |
| Chain::const_iterator | chain_start |
| What are the bounds of that underlying vector? More... | |
| Chain::const_iterator | chain_end |
| bool | is_rend |
| bool | complement |
| pair< const Snarl *, bool > | scratch |
We want to be able to loop over a chain and get iterators to pairs of the snarl and its orientation in the chain. So we define some iterators.
| bool vg::ChainIterator::operator!= | ( | const ChainIterator & | other | ) | const |
| pair< const Snarl *, bool > vg::ChainIterator::operator* | ( | ) | const |
Get the snarl we're at and whether it is backward.
| ChainIterator & vg::ChainIterator::operator++ | ( | ) |
Advance the iterator.
| const pair< const Snarl *, bool > * vg::ChainIterator::operator-> | ( | ) | const |
Get a pointer to the thing we get when we dereference the iterator.
| bool vg::ChainIterator::operator== | ( | const ChainIterator & | other | ) | const |
We need to define comparison because C++ doesn't give it to us for free.
| Chain::const_iterator vg::ChainIterator::chain_end |
| Chain::const_iterator vg::ChainIterator::chain_start |
What are the bounds of that underlying vector?
| bool vg::ChainIterator::complement |
When dereferencing, should we flip snarl orientations from the orientations they appear at in the chain when read left to right?
| bool vg::ChainIterator::go_left |
Are we a reverse iterator or not?
| bool vg::ChainIterator::is_rend |
Since we're using backing random access itarators to provide reverse iterators, we need a flag to see if we are rend (i.e. before the beginning)
| Chain::const_iterator vg::ChainIterator::pos |
What position in the underlying vector are we in?
|
mutable |
In order to dereference to a pair with -> we need a place to put the pair so we can have a pointer to it. Gets lazily set to wherever the iterator is pointing when we do ->
1.8.17