From 5341bec71f277447025dd9beb67a38d134d3dcc3 Mon Sep 17 00:00:00 2001
From: Aleksandr Shatrovskii <shatrale@fit.cvut.cz>
Date: Wed, 10 May 2017 03:29:45 +0200
Subject: [PATCH] Let aarbology know about new ExactSubtreeRepeats

---
 aarbology2/src/aarbology.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/aarbology2/src/aarbology.cpp b/aarbology2/src/aarbology.cpp
index d3c492cdeb..fec5a8ec48 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 ( ) ) );
-- 
GitLab