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