anubis search suspended
Former-commit-id: 1e73eb108ea6961bb8306aed3c0bbaf9127f3c69
This commit is contained in:
parent
8f953883bf
commit
2a3c7eddfe
@ -24,39 +24,34 @@ boost::ptr_vector<AnubisSearchResult> AnubisSearcher::anubisSearch(
|
||||
boost::shared_ptr<std::vector<INDEX_CHARACTER_TYPE> > pattern)
|
||||
throw(ConcordiaException) {
|
||||
boost::ptr_vector<AnubisSearchResult> result;
|
||||
|
||||
|
||||
boost::shared_ptr<std::vector<sauchar_t> > patternVector =
|
||||
Utils::indexVectorToSaucharVector(pattern);
|
||||
|
||||
if (patternVector->size() != pattern->size() * sizeof(INDEX_CHARACTER_TYPE)) {
|
||||
throw ConcordiaException("Increasing pattern resolution went wrong.");
|
||||
}
|
||||
|
||||
|
||||
if (patternVector->size() !=
|
||||
pattern->size() * sizeof(INDEX_CHARACTER_TYPE)) {
|
||||
throw ConcordiaException("Increasing pattern resolution went wrong.");
|
||||
}
|
||||
|
||||
TmMatchesMap tmMatchesMap;
|
||||
for (int offset = 0;offset < pattern->size(); offset++) {
|
||||
for (int offset = 0; offset < pattern->size(); offset++) {
|
||||
int highResOffset = offset * sizeof(INDEX_CHARACTER_TYPE);
|
||||
boost::shared_ptr<std::vector<sauchar_t> > currentPattern =
|
||||
boost::shared_ptr<std::vector<sauchar_t> >(new std::vector<sauchar_t>(
|
||||
patternVector->begin()+highResOffset,patternVector->end()));
|
||||
boost::shared_ptr<std::vector<sauchar_t> >
|
||||
(new std::vector<sauchar_t>(
|
||||
patternVector->begin()+highResOffset, patternVector->end()));
|
||||
SUFFIX_MARKER_TYPE longestPrefixesLength;
|
||||
boost::ptr_vector<SubstringOccurence> longestPrefixes = lcpSearch(T, markers, SA,
|
||||
currentPattern, longestPrefixesLength);
|
||||
boost::ptr_vector<SubstringOccurence> longestPrefixes =
|
||||
lcpSearch(T, markers, SA, currentPattern, longestPrefixesLength);
|
||||
|
||||
BOOST_FOREACH(SubstringOccurence & occurence, longestPrefixes) {
|
||||
TmMatchesMapIterator mapIterator = tmMatchesMap.find(occurence.getId());
|
||||
if(mapIterator != tmMatchesMap.end()) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
TmMatchesMapIterator mapIterator = tmMatchesMap.find(
|
||||
occurence.getId());
|
||||
if (mapIterator != tmMatchesMap.end()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -44,10 +44,9 @@ sauchar_t * Utils::indexVectorToSaucharArray(
|
||||
|
||||
boost::shared_ptr<std::vector<sauchar_t> > Utils::indexVectorToSaucharVector(
|
||||
boost::shared_ptr<vector<INDEX_CHARACTER_TYPE> > input) {
|
||||
|
||||
boost::shared_ptr<std::vector<sauchar_t> > result = boost::shared_ptr<std::vector<sauchar_t> >(
|
||||
new std::vector<sauchar_t>);
|
||||
|
||||
boost::shared_ptr<std::vector<sauchar_t> > result =
|
||||
boost::shared_ptr<std::vector<sauchar_t> >(new std::vector<sauchar_t>);
|
||||
|
||||
for (vector<INDEX_CHARACTER_TYPE>::iterator it = input->begin();
|
||||
it != input->end(); ++it) {
|
||||
appendCharToSaucharVector(result, *it);
|
||||
@ -71,6 +70,4 @@ void Utils::_insertCharToSaucharArray(sauchar_t * array,
|
||||
array[i] = characterArray[i-pos];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -34,7 +34,8 @@ public:
|
||||
static sauchar_t * indexVectorToSaucharArray(
|
||||
boost::shared_ptr<vector<INDEX_CHARACTER_TYPE> > input);
|
||||
|
||||
static boost::shared_ptr<std::vector<sauchar_t> > indexVectorToSaucharVector(
|
||||
static boost::shared_ptr<std::vector<sauchar_t> >
|
||||
indexVectorToSaucharVector(
|
||||
boost::shared_ptr<vector<INDEX_CHARACTER_TYPE> > input);
|
||||
|
||||
static void appendCharToSaucharVector(
|
||||
|
Loading…
Reference in New Issue
Block a user