Tree Compression with Top Trees Revisited
|
Transform a tree into its top tree. More...
#include <TopDagConstructor.h>
Public Member Functions | |
TopDagConstructor (TreeType &tree, TopDag< DataType > &topDag, const bool verbose=true, const bool extraVerbose=false) | |
void | construct (DebugInfo *debugInfo=NULL) |
Protected Member Functions | |
void | mergeCallback (const int u, const int v, const int n, const MergeType type) |
void | doMerges (DebugInfo *debugInfo) |
void | horizontalMerges (const int iteration) |
Do one iteration of horizontal merges (step 1) More... | |
void | horizontalMergesAllPairs (const int iteration) |
void | verticalMerges (const int iteration) |
Perform an iteration of vertical (chain) merges (step 2) More... | |
Protected Attributes | |
TreeType & | tree |
TopDag< DataType > & | topDag |
const bool | verbose |
const bool | extraVerbose |
vector< int > | nodeIds |
Transform a tree into its top tree.
Given a tree (currently, only OrderedTree is supported), construct its top tree iteratively.
The original tree will be modified heavily in the process! When transformation is complete, only one edge will remain and nodes' parent values will be lost as well. In short, this destroys the input tree.
Definition at line 28 of file TopDagConstructor.h.
|
inline |
Instantiate a top tree constructor
tree | the tree which shall be transformed. WILL BE MODIFIED |
topDag | the output top tree |
verbose | whether to print detailed information about the iterations |
extraVerbose | whether to print the tree in each iteration |
Definition at line 38 of file TopDagConstructor.h.
|
inline |
Perform the top tree construction procedure
debugInfo | pointer to a DebugInfo object, should you wish logging of debug information |
Definition at line 43 of file TopDagConstructor.h.
|
inlineprotected |
do iterated merges to construct a top tree
mergeCallback | the callback that will be called for every pair of merged nodes (clusters). Its arguments are the ids of the two merged nodes and the new id (usually one of the two old ones) as well as the type of the merge |
debugInfo | the DebugInfo object or NULL |
verbose | whether to print detailed information about the iterations |
extraVerbose | whether to print the tree in each iteration |
Definition at line 63 of file TopDagConstructor.h.
|
inlineprotected |
Do one iteration of horizontal merges (step 1)
Definition at line 103 of file TopDagConstructor.h.
|
inlineprotected |
Do one iteration of horizontal merges (step 1) Modified to look at (1,2), (2,3), (3,4) etc instead of (1,2), (3,4), etc
Definition at line 169 of file TopDagConstructor.h.
|
inlineprotected |
Definition at line 52 of file TopDagConstructor.h.
|
inlineprotected |
Perform an iteration of vertical (chain) merges (step 2)
Definition at line 207 of file TopDagConstructor.h.
|
protected |
Definition at line 258 of file TopDagConstructor.h.
|
protected |
Definition at line 259 of file TopDagConstructor.h.
|
protected |
Definition at line 257 of file TopDagConstructor.h.
|
protected |
Definition at line 256 of file TopDagConstructor.h.
|
protected |
Definition at line 258 of file TopDagConstructor.h.