#ifndef ANUBIS_SEARCHER_HDR #define ANUBIS_SEARCHER_HDR #include #include #include "concordia/common/config.hpp" #include "concordia/common/utils.hpp" #include "concordia/substring_occurence.hpp" #include "concordia/concordia_exception.hpp" #include "concordia/anubis_search_result.hpp" #include /*! Class for searching using Anubis algorithm. */ using namespace std; class AnubisSearcher { public: explicit AnubisSearcher(); /*! Destructor. */ virtual ~AnubisSearcher(); boost::ptr_vector anubisSearch( boost::shared_ptr > T, boost::shared_ptr > markers, boost::shared_ptr > SA, boost::shared_ptr > pattern) throw(ConcordiaException); boost::ptr_vector lcpSearch( boost::shared_ptr > T, boost::shared_ptr > markers, boost::shared_ptr > SA, boost::shared_ptr > pattern, SUFFIX_MARKER_TYPE & length) throw(ConcordiaException); private: void _collectResults(boost::ptr_vector & result, boost::shared_ptr > markers, boost::shared_ptr > SA, saidx_t left, saidx_t size); }; #endif