SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
An forward iterator for (compressed) suffix trees. More...
#include <cst_iterators.hpp>
Public Types | |
typedef Cst::node_type | value_type |
typedef const value_type | const_reference |
typedef Cst::size_type | size_type |
typedef cst_dfs_const_forward_iterator < Cst > | iterator |
typedef Cst::node_type | node_type |
Public Member Functions | |
cst_dfs_const_forward_iterator () | |
Default constructor. | |
cst_dfs_const_forward_iterator (const Cst *cst, const value_type node, bool visited=false, bool valid=true) | |
Constructor. | |
~cst_dfs_const_forward_iterator () | |
Copy Constructor. | |
uint8_t | visit () const |
Returns how often the current node was already visited. | |
void | skip_subtree () |
const_reference | operator* () const |
Method for dereferencing the iterator. | |
iterator & | operator++ () |
Prefix increment of the iterator. | |
void | operator++ (int x) |
Postfix increment of the iterator. | |
bool | operator== (const iterator &it) const |
Equality operator. | |
bool | operator!= (const iterator &it) const |
Inequality operator. |
An forward iterator for (compressed) suffix trees.
The cst_dfs_const_forward_iterator iterates through the nodes of a (compressed) suffix tree in depth first search (dfs) order. Note, that
If the current node is a inner node, the method visit() returns 1 for the first visit and 2 for the second one.
\par Time complexity
for all methods
This iterator is the standard iterator for the classes - sdsl::cst_sada, - sdsl::cst_sct, - sdsl::cst_sct2, and - sdsl::cst_sct3