SDSL
3.0.0
Succinct Data Structure Library
|
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. More... | |
size_type | size () const |
Returns the current number of nodes in the queue. More... | |
const_reference | operator* () const |
Method for dereferencing the iterator. More... | |
iterator & | operator++ () |
Prefix increment of the iterator. More... | |
iterator | operator++ (int) |
Postfix increment of the iterator. More... | |
bool | operator== (const iterator &it) const |
Equality operator. More... | |
bool | operator!= (const iterator &it) const |
Inequality operator. More... | |
A forward iterator for a breath first traversal of a tree.
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. |
Definition at line 265 of file cst_iterators.hpp.
typedef const value_type sdsl::cst_bfs_iterator< Cst, Queue >::const_reference |
Definition at line 269 of file cst_iterators.hpp.
typedef cst_bfs_iterator<Cst, Queue> sdsl::cst_bfs_iterator< Cst, Queue >::iterator |
Definition at line 271 of file cst_iterators.hpp.
typedef Queue sdsl::cst_bfs_iterator< Cst, Queue >::queue_type |
Definition at line 272 of file cst_iterators.hpp.
typedef Cst::size_type sdsl::cst_bfs_iterator< Cst, Queue >::size_type |
Definition at line 270 of file cst_iterators.hpp.
typedef Cst::node_type sdsl::cst_bfs_iterator< Cst, Queue >::value_type |
Definition at line 268 of file cst_iterators.hpp.
|
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. |
Definition at line 287 of file cst_iterators.hpp.
|
inline |
Inequality operator.
Definition at line 346 of file cst_iterators.hpp.
|
inline |
Method for dereferencing the iterator.
Definition at line 298 of file cst_iterators.hpp.
|
inline |
Prefix increment of the iterator.
Definition at line 301 of file cst_iterators.hpp.
|
inline |
Postfix increment of the iterator.
Definition at line 321 of file cst_iterators.hpp.
|
inline |
Equality operator.
Definition at line 329 of file cst_iterators.hpp.
|
inline |
Returns the current number of nodes in the queue.
Definition at line 295 of file cst_iterators.hpp.