SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Public Types | Public Member Functions
sdsl::cst_bfs_iterator< Cst, Queue > Class Template Reference

A forward iterator for a breath first traversal of a tree. More...

#include <cst_iterators.hpp>

List of all members.

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.
iteratoroperator++ ()
 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.

Detailed Description

template<class Cst, class Queue = std::queue<typename Cst::node_type>>
class sdsl::cst_bfs_iterator< Cst, Queue >

A forward iterator for a breath first traversal of a tree.

  \tparam Cst     A class which fulfills the CST concept
Template Parameters:
QueueA queue for the traversal. Note that for large data, you should use an external implementation of a queue.

Constructor & Destructor Documentation

template<class Cst , class Queue = std::queue<typename Cst::node_type>>
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.

Parameters:
cstPointer to the compressed suffix tree.
nodeRoot node of the traversal.
validState of the iterator.
endIf valid=true and end=true, we get the end() iterator otherwise ``end'' has no effect.

The documentation for this class was generated from the following file: