Tree Compression with Top Trees Revisited
Public Types | Static Public Member Functions | List of all members
BPString Struct Reference

Convert tree to BP string & label char collection. More...

#include <BPString.h>

Public Types

enum  Parentheses { OPEN = 0, CLOSE = 1 }
 

Static Public Member Functions

template<typename NodeType , typename EdgeType , typename DataType >
static void fromTree (const OrderedTree< NodeType, EdgeType > &tree, const LabelsT< DataType > &labels, std::vector< bool > &bpstring, std::vector< unsigned char > &labelNames)
 

Detailed Description

Convert tree to BP string & label char collection.

Definition at line 12 of file BPString.h.

Member Enumeration Documentation

Enumerator
OPEN 
CLOSE 

Definition at line 13 of file BPString.h.

Member Function Documentation

template<typename NodeType , typename EdgeType , typename DataType >
static void BPString::fromTree ( const OrderedTree< NodeType, EdgeType > &  tree,
const LabelsT< DataType > &  labels,
std::vector< bool > &  bpstring,
std::vector< unsigned char > &  labelNames 
)
inlinestatic

Turn an OrderedTree instance into a balanced parenthesis bitstring for the tree structure, and a nullbyte-separated label vector (null-bytes not allowed in input labels). A node is coded as "(children)", e.g. "(()())" for a node with two leaf children

Definition at line 21 of file BPString.h.


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