22 int main(
int argc,
char **argv) {
28 const bool useRePair = argParser.
isSet(
"r");
29 string filename = argParser.
get<
string>(
"i",
"data/1998statistics.xml");
30 string outputfolder = argParser.
get<
string>(
"o",
"/tmp");
39 cout <<
"Wrote orginial trimmed XML file in " << timer.
getAndReset() <<
"ms: " << t.
summary() << endl;
57 cout <<
"Top DAG construction took " << timer.
getAndReset() <<
"ms" << endl;
60 cout <<
"Top DAG has " << dag.
nodes.size() - 1 <<
" nodes, " << dag.
countEdges() <<
" edges" << endl;
67 cout <<
"Unpacked Top DAG in " << timer.
getAndReset() <<
"ms, top tree has " << recoveredTopTree.
clusters.size() <<
" clusters" << endl;
74 cout <<
"Unpacked recovered top tree in " << timer.
getAndReset() <<
"ms: " << recoveredTree.
summary() << endl;
77 cout <<
"Wrote recovered tree in " << timer.
getAndReset() <<
"ms" << endl;
Transform a tree into its top tree.
vector< DagNode< DataType > > nodes
Ordered tree data structure.
Unpack a TopTree into its original OrderedTree.
bool isSet(const string &arg) const
check whether an argument was set
int main(int argc, char **argv)
std::vector< Cluster< DataType > > clusters
Read an XML file into a tree, using RapidXml.
Parse command-line arguments.
void construct(DebugInfo *debugInfo=NULL)
Unpack a binary DAG to its original top tree.
T get(const string &key, const T defaultValue=T())
Transform a tree into its top tree.
string summary() const
A one-line summary of the tree.
XML tree writer (empty template for overloading)
int countEdges() const
Count the number of edges in the DAG.
A binary DAG that is specialised to be a top tree's minimal DAG.
void construct(DebugInfo *debugInfo=NULL, const double minRatio=1.2)
A key-value label storage.