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_dfs_const_forward_iterator< Cst, cache_size > Class Template Reference

An forward iterator for (compressed) suffix trees. 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_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.
iteratoroperator++ ()
 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.

Detailed Description

template<class Cst, uint32_t cache_size = 128>
class sdsl::cst_dfs_const_forward_iterator< Cst, cache_size >

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

$\Order{1}$ for all methods

Space complexity
$\Order{1} $
   This iterator is the standard iterator for the classes
           - sdsl::cst_sada,
           - sdsl::cst_sct,
           - sdsl::cst_sct2, and
           - sdsl::cst_sct3

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