Anubis search stub
Former-commit-id: 4d8c76f85afbe910daca69e695c86165c32adbd8
This commit is contained in:
parent
6c73631691
commit
d5e692ebfd
@ -6,6 +6,9 @@ foreach(dir ${ALL_DIRECTORIES})
|
|||||||
endforeach(dir)
|
endforeach(dir)
|
||||||
|
|
||||||
add_library(concordia SHARED
|
add_library(concordia SHARED
|
||||||
|
interval.cpp
|
||||||
|
tm_matches.cpp
|
||||||
|
anubis_search_result.cpp
|
||||||
substring_occurence.cpp
|
substring_occurence.cpp
|
||||||
example.cpp
|
example.cpp
|
||||||
index_searcher.cpp
|
index_searcher.cpp
|
||||||
@ -24,6 +27,9 @@ add_subdirectory(t)
|
|||||||
|
|
||||||
install(TARGETS concordia DESTINATION lib/)
|
install(TARGETS concordia DESTINATION lib/)
|
||||||
install(FILES
|
install(FILES
|
||||||
|
interval.hpp
|
||||||
|
tm_matches.hpp
|
||||||
|
anubis_search_result.hpp
|
||||||
substring_occurence.hpp
|
substring_occurence.hpp
|
||||||
example.hpp
|
example.hpp
|
||||||
index_searcher.hpp
|
index_searcher.hpp
|
||||||
|
@ -37,6 +37,7 @@ boost::ptr_vector<SubstringOccurence> IndexSearcher::simpleSearch(
|
|||||||
saidx_t actualResultPos = resultPos / sizeof(INDEX_CHARACTER_TYPE);
|
saidx_t actualResultPos = resultPos / sizeof(INDEX_CHARACTER_TYPE);
|
||||||
SUFFIX_MARKER_TYPE marker = markers->at(actualResultPos);
|
SUFFIX_MARKER_TYPE marker = markers->at(actualResultPos);
|
||||||
|
|
||||||
|
//TODO think about using bitwise operators in the below code
|
||||||
result.push_back(new SubstringOccurence(
|
result.push_back(new SubstringOccurence(
|
||||||
marker / SUFFIX_MARKER_DIVISOR,
|
marker / SUFFIX_MARKER_DIVISOR,
|
||||||
marker % SUFFIX_MARKER_DIVISOR));
|
marker % SUFFIX_MARKER_DIVISOR));
|
||||||
@ -47,3 +48,12 @@ boost::ptr_vector<SubstringOccurence> IndexSearcher::simpleSearch(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::ptr_vector<AnubisSearchResult> IndexSearcher::anubisSearch(
|
||||||
|
boost::shared_ptr<HashGenerator> hashGenerator,
|
||||||
|
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 string & pattern) throw(ConcordiaException) {
|
||||||
|
boost::ptr_vector<AnubisSearchResult> result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "concordia/substring_occurence.hpp"
|
#include "concordia/substring_occurence.hpp"
|
||||||
#include "concordia/hash_generator.hpp"
|
#include "concordia/hash_generator.hpp"
|
||||||
#include "concordia/concordia_exception.hpp"
|
#include "concordia/concordia_exception.hpp"
|
||||||
|
#include "concordia/anubis_search_result.hpp"
|
||||||
|
|
||||||
#include "divsufsort.h"
|
#include "divsufsort.h"
|
||||||
|
|
||||||
@ -34,6 +35,13 @@ public:
|
|||||||
boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
|
boost::shared_ptr<std::vector<SUFFIX_MARKER_TYPE> > markers,
|
||||||
boost::shared_ptr<std::vector<saidx_t> > SA,
|
boost::shared_ptr<std::vector<saidx_t> > SA,
|
||||||
const string & pattern) throw(ConcordiaException);
|
const string & pattern) throw(ConcordiaException);
|
||||||
|
|
||||||
|
boost::ptr_vector<AnubisSearchResult> anubisSearch(
|
||||||
|
boost::shared_ptr<HashGenerator> hashGenerator,
|
||||||
|
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 string & pattern) throw(ConcordiaException);
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
add_library(concordia-tests
|
add_library(concordia-tests
|
||||||
|
test_tm_matches.cpp
|
||||||
|
test_interval.cpp
|
||||||
test_logging.cpp
|
test_logging.cpp
|
||||||
test_utils.cpp
|
test_utils.cpp
|
||||||
test_word_map.cpp
|
test_word_map.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user