Tree Compression with Top Trees Revisited
Public Types | Public Member Functions | List of all members
Navigator< DataType > Class Template Reference

Navigate around in an in-memory Top DAG. More...

#include <Navigation.h>

Public Types

using DAGType = TopDag< DataType >
 
using DStackT = std::stack< NavigationRecord >
 
using TStackT = std::deque< DStackT >
 

Public Member Functions

 Navigator (const DAGType &dag)
 Create a new navigator for the given Top DAG. More...
 
const DataType * getLabel () const
 Retrieve the current node's label. More...
 
bool parent ()
 
bool isLeaf ()
 Check whether the current node is a leaf in the tree. More...
 
bool firstChild ()
 
bool nextSibling ()
 
void dumpDagStack ()
 Debug helper to dump the DAG stack. More...
 
long long getTreeStackSize () const
 Debug helper to retrieve tree stack size. More...
 
long long getMaxTreeStackSize () const
 Debug helper to return largest tree stack size encountered. More...
 

Detailed Description

template<typename DataType>
class Navigator< DataType >

Navigate around in an in-memory Top DAG.

Definition at line 28 of file Navigation.h.

Member Typedef Documentation

template<typename DataType>
using Navigator< DataType >::DAGType = TopDag<DataType>

Definition at line 30 of file Navigation.h.

template<typename DataType>
using Navigator< DataType >::DStackT = std::stack<NavigationRecord>

Definition at line 31 of file Navigation.h.

template<typename DataType>
using Navigator< DataType >::TStackT = std::deque<DStackT>

Definition at line 32 of file Navigation.h.

Constructor & Destructor Documentation

template<typename DataType>
Navigator< DataType >::Navigator ( const DAGType dag)
inline

Create a new navigator for the given Top DAG.

Definition at line 35 of file Navigation.h.

Member Function Documentation

template<typename DataType>
void Navigator< DataType >::dumpDagStack ( )
inline

Debug helper to dump the DAG stack.

Definition at line 159 of file Navigation.h.

template<typename DataType>
bool Navigator< DataType >::firstChild ( )
inline

Move to the current node's first child

Returns
whether the operation was a success

Definition at line 89 of file Navigation.h.

template<typename DataType>
const DataType* Navigator< DataType >::getLabel ( ) const
inline

Retrieve the current node's label.

Definition at line 48 of file Navigation.h.

template<typename DataType>
long long Navigator< DataType >::getMaxTreeStackSize ( ) const
inline

Debug helper to return largest tree stack size encountered.

Definition at line 180 of file Navigation.h.

template<typename DataType>
long long Navigator< DataType >::getTreeStackSize ( ) const
inline

Debug helper to retrieve tree stack size.

Definition at line 170 of file Navigation.h.

template<typename DataType>
bool Navigator< DataType >::isLeaf ( )
inline

Check whether the current node is a leaf in the tree.

Definition at line 65 of file Navigation.h.

template<typename DataType>
bool Navigator< DataType >::nextSibling ( )
inline

Move to the current node's next sibling

Returns
whether the operation was a success

Definition at line 120 of file Navigation.h.

template<typename DataType>
bool Navigator< DataType >::parent ( )
inline

Move to the current node's parent

Returns
whether the operation completed successfully (i.e. if the current node had a parent)

Definition at line 54 of file Navigation.h.


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