diff --git a/aarbology2/src/aarbology.cpp b/aarbology2/src/aarbology.cpp index fec5a8ec48b5be70fad4b330d155e0ac2d132bb2..f96931017abffc3881f1cc42de52f66c4f8e3556 100644 --- a/aarbology2/src/aarbology.cpp +++ b/aarbology2/src/aarbology.cpp @@ -31,6 +31,7 @@ #include <arbology/exact/ExactNonlinearTreePatternAutomaton.h> #include <tree/properties/ExactSubtreeRepeatsNaive.h> #include <tree/properties/ExactSubtreeRepeats.h> +#include <tree/NormalizeTreeLabels.h> #include <arbology/transform/BeginToEndIndex.h> #include <arbology/indexing/CompressedBitParallelIndexConstruction.h> #include <arbology/indexing/FullAndLinearIndexConstruction.h> @@ -61,6 +62,7 @@ int main ( int argc, char * argv[] ) { allowed.push_back ( "exactSubtreeRepeatsNaive" ); allowed.push_back ( "exactSubtreeRepeats" ); + allowed.push_back ( "normalizeTreeLabels" ); allowed.push_back ( "badCharacterShiftTable" ); TCLAP::ValuesConstraint < std::string > allowedVals ( allowed ); @@ -262,6 +264,18 @@ int main ( int argc, char * argv[] ) { measurements::end ( ); measurements::start ( "Output write", measurements::Type::AUXILIARY ); + alib::XmlDataFactory::toStdout ( res ); + } else if ( algorithm.getValue ( ) == "normalizeTreeLabels" ) { + tree::Tree subject = alib::XmlDataFactory::fromTokens ( std::move ( sax::FromXMLParserHelper::parseInput(true, subjectInput).front ( ) ) ); + + measurements::end ( ); + measurements::start ( "Algorithm", measurements::Type::MAIN ); + + tree::Tree res = tree::NormalizeTreeLabels::normalize ( subject ); + + measurements::end ( ); + measurements::start ( "Output write", measurements::Type::AUXILIARY ); + alib::XmlDataFactory::toStdout ( res ); } else if ( algorithm.getValue ( ) == "exactSubtreeRepeats" ) { tree::Tree subject = alib::XmlDataFactory::fromTokens ( std::move ( sax::FromXMLParserHelper::parseInput(true, subjectInput).front ( ) ) );