1 #ifndef ANUBIS_SEARCHER_HDR
2 #define ANUBIS_SEARCHER_HDR
4 #include <boost/shared_ptr.hpp>
6 #include "concordia/common/config.hpp"
7 #include "concordia/common/utils.hpp"
8 #include "concordia/substring_occurence.hpp"
9 #include "concordia/concordia_exception.hpp"
10 #include "concordia/concordia_config.hpp"
11 #include "concordia/concordia_search_result.hpp"
12 #include "concordia/anubis_search_result.hpp"
13 #include "concordia/tm_matches.hpp"
16 #include <divsufsort.h>
45 boost::shared_ptr<ConcordiaSearchResult> result,
46 boost::shared_ptr<std::vector<sauchar_t> > T,
47 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
48 boost::shared_ptr<std::vector<saidx_t> > SA,
49 const std::vector<INDEX_CHARACTER_TYPE> & pattern)
67 boost::shared_ptr<ConcordiaConfig> config,
68 boost::shared_ptr<std::vector<sauchar_t> > T,
69 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
70 boost::shared_ptr<std::vector<saidx_t> > SA,
71 const std::vector<INDEX_CHARACTER_TYPE> & pattern)
86 boost::shared_ptr<std::vector<sauchar_t> > T,
87 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
88 boost::shared_ptr<std::vector<saidx_t> > SA,
89 const std::vector<INDEX_CHARACTER_TYPE> & pattern)
107 std::vector<SubstringOccurence>
lcpSearch(
108 boost::shared_ptr<std::vector<sauchar_t> > T,
109 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
110 boost::shared_ptr<std::vector<saidx_t> > SA,
111 const std::vector<sauchar_t> & pattern,
115 void _collectResults(std::vector<SubstringOccurence> & result,
116 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
117 boost::shared_ptr<std::vector<saidx_t> > SA,
118 saidx_t left, saidx_t size);
120 void _addToMap(boost::shared_ptr<std::vector<saidx_t> > SA,
121 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
122 boost::shared_ptr<TmMatchesMap> tmMatchesMap,
124 SUFFIX_MARKER_TYPE totalPatternLength,
125 SUFFIX_MARKER_TYPE matchedFragmentLength,
126 SUFFIX_MARKER_TYPE patternOffset);
128 bool _getOccurenceFromSA(boost::shared_ptr<std::vector<saidx_t> > SA,
129 boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
133 void _addOccurenceToMap(boost::shared_ptr<TmMatchesMap> tmMatchesMap,
135 SUFFIX_MARKER_TYPE totalPatternLength,
136 SUFFIX_MARKER_TYPE matchedFragmentLength,
137 SUFFIX_MARKER_TYPE patternOffset);
Definition: concordia_searcher.hpp:24
virtual ~ConcordiaSearcher()
Definition: concordia_searcher.cpp:11
Definition: concordia_exception.hpp:11
boost::shared_ptr< TmMatchesMap > getTmMatches(boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern)
Definition: concordia_searcher.cpp:88
void concordiaSearch(boost::shared_ptr< ConcordiaSearchResult > result, boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern)
Definition: concordia_searcher.cpp:14
Definition: substring_occurence.hpp:16
std::vector< SubstringOccurence > lcpSearch(boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< sauchar_t > &pattern, SUFFIX_MARKER_TYPE &length)
Definition: concordia_searcher.cpp:161
std::vector< AnubisSearchResult > anubisSearch(boost::shared_ptr< ConcordiaConfig > config, boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern)
Definition: concordia_searcher.cpp:56