SDSL 3.0.1
Succinct Data Structure Library
|
A forward iterator for a breath first traversal of a tree. More...
#include <cst_iterators.hpp>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
using | value_type = typename Cst::node_type |
using | difference_type = std::ptrdiff_t |
using | pointer = value_type * |
using | reference = 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 275 of file cst_iterators.hpp.
typedef const value_type sdsl::cst_bfs_iterator< Cst, Queue >::const_reference |
Definition at line 284 of file cst_iterators.hpp.
using sdsl::cst_bfs_iterator< Cst, Queue >::difference_type = std::ptrdiff_t |
Definition at line 280 of file cst_iterators.hpp.
typedef cst_bfs_iterator<Cst, Queue> sdsl::cst_bfs_iterator< Cst, Queue >::iterator |
Definition at line 286 of file cst_iterators.hpp.
using sdsl::cst_bfs_iterator< Cst, Queue >::iterator_category = std::forward_iterator_tag |
Definition at line 278 of file cst_iterators.hpp.
using sdsl::cst_bfs_iterator< Cst, Queue >::pointer = value_type * |
Definition at line 281 of file cst_iterators.hpp.
typedef Queue sdsl::cst_bfs_iterator< Cst, Queue >::queue_type |
Definition at line 287 of file cst_iterators.hpp.
using sdsl::cst_bfs_iterator< Cst, Queue >::reference = value_type & |
Definition at line 282 of file cst_iterators.hpp.
typedef Cst::size_type sdsl::cst_bfs_iterator< Cst, Queue >::size_type |
Definition at line 285 of file cst_iterators.hpp.
using sdsl::cst_bfs_iterator< Cst, Queue >::value_type = typename Cst::node_type |
Definition at line 279 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 302 of file cst_iterators.hpp.
|
inline |
Inequality operator.
Definition at line 361 of file cst_iterators.hpp.
|
inline |
Method for dereferencing the iterator.
Definition at line 313 of file cst_iterators.hpp.
|
inline |
Prefix increment of the iterator.
Definition at line 316 of file cst_iterators.hpp.
|
inline |
Postfix increment of the iterator.
Definition at line 336 of file cst_iterators.hpp.
|
inline |
Equality operator.
Definition at line 344 of file cst_iterators.hpp.
|
inline |
Returns the current number of nodes in the queue.
Definition at line 310 of file cst_iterators.hpp.