diff --git a/concordia/CMakeLists.txt b/concordia/CMakeLists.txt index d86835d..727f9a1 100644 --- a/concordia/CMakeLists.txt +++ b/concordia/CMakeLists.txt @@ -6,6 +6,9 @@ foreach(dir ${ALL_DIRECTORIES}) endforeach(dir) add_library(concordia SHARED + interval.cpp + tm_matches.cpp + anubis_search_result.cpp substring_occurence.cpp example.cpp index_searcher.cpp @@ -24,6 +27,9 @@ add_subdirectory(t) install(TARGETS concordia DESTINATION lib/) install(FILES + interval.hpp + tm_matches.hpp + anubis_search_result.hpp substring_occurence.hpp example.hpp index_searcher.hpp diff --git a/concordia/index_searcher.cpp b/concordia/index_searcher.cpp index d88efbe..0f232d1 100644 --- a/concordia/index_searcher.cpp +++ b/concordia/index_searcher.cpp @@ -37,6 +37,7 @@ boost::ptr_vector IndexSearcher::simpleSearch( saidx_t actualResultPos = resultPos / sizeof(INDEX_CHARACTER_TYPE); SUFFIX_MARKER_TYPE marker = markers->at(actualResultPos); + //TODO think about using bitwise operators in the below code result.push_back(new SubstringOccurence( marker / SUFFIX_MARKER_DIVISOR, marker % SUFFIX_MARKER_DIVISOR)); @@ -47,3 +48,12 @@ boost::ptr_vector IndexSearcher::simpleSearch( return result; } +boost::ptr_vector IndexSearcher::anubisSearch( + boost::shared_ptr hashGenerator, + boost::shared_ptr > T, + boost::shared_ptr > markers, + boost::shared_ptr > SA, + const string & pattern) throw(ConcordiaException) { + boost::ptr_vector result; + return result; +} diff --git a/concordia/index_searcher.hpp b/concordia/index_searcher.hpp index 74d2257..906eccc 100644 --- a/concordia/index_searcher.hpp +++ b/concordia/index_searcher.hpp @@ -10,6 +10,7 @@ #include "concordia/substring_occurence.hpp" #include "concordia/hash_generator.hpp" #include "concordia/concordia_exception.hpp" +#include "concordia/anubis_search_result.hpp" #include "divsufsort.h" @@ -34,6 +35,13 @@ public: boost::shared_ptr > markers, boost::shared_ptr > SA, const string & pattern) throw(ConcordiaException); + + boost::ptr_vector anubisSearch( + boost::shared_ptr hashGenerator, + boost::shared_ptr > T, + boost::shared_ptr > markers, + boost::shared_ptr > SA, + const string & pattern) throw(ConcordiaException); private: }; diff --git a/concordia/t/CMakeLists.txt b/concordia/t/CMakeLists.txt index bbb2a9a..867112f 100644 --- a/concordia/t/CMakeLists.txt +++ b/concordia/t/CMakeLists.txt @@ -1,4 +1,6 @@ add_library(concordia-tests + test_tm_matches.cpp + test_interval.cpp test_logging.cpp test_utils.cpp test_word_map.cpp