|
SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
A forward iterator for a breath first traversal of a tree. 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_bfs_iterator< Cst, Queue > | iterator |
| typedef Queue | queue_type |
Public Member Functions | |
| cst_bfs_iterator (const Cst *cst, const value_type node, bool valid=true, bool end_it=false) | |
| Constructor. | |
| size_type | size () const |
| Returns the current number of nodes in the queue. | |
| const_reference | operator* () const |
| Method for dereferencing the iterator. | |
| iterator & | operator++ () |
| Prefix increment of the iterator. | |
| iterator | operator++ (int x) |
| Postfix increment of the iterator. | |
| bool | operator== (const iterator &it) const |
| Equality operator. | |
| bool | operator!= (const iterator &it) const |
| Inequality operator. | |
A forward iterator for a breath first traversal of a tree.
\tparam Cst A class which fulfills the CST concept
| Queue | A queue for the traversal. Note that for large data, you should use an external implementation of a queue. |
| sdsl::cst_bfs_iterator< Cst, Queue >::cst_bfs_iterator | ( | const Cst * | cst, |
| const value_type | node, | ||
| bool | valid = true, |
||
| bool | end_it = false |
||
| ) | [inline] |
Constructor.
| cst | Pointer to the compressed suffix tree. |
| node | Root node of the traversal. |
| valid | State of the iterator. |
| end | If valid=true and end=true, we get the end() iterator otherwise ``end'' has no effect. |
1.8.0