Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <binsearch.h>
Static Public Member Functions | |
template<typename _Iterator , typename _PatternIterator > | |
static void | searchSuffixArray (_Iterator first, _Iterator last, const std::vector< int > &array, _PatternIterator pattern_first, _PatternIterator pattern_last, strings::search_callback::SearchCallback< _Iterator > *callback) |
Implementation of the suffix array search using bin-search algorithm
Time: <it>O(p log n)</it> worst case where p is the length of the pattern and n is the length of the suffix array
static void strings::suffix_array::Binsearch::searchSuffixArray | ( | _Iterator | first, |
_Iterator | last, | ||
const std::vector< int > & | array, | ||
_PatternIterator | pattern_first, | ||
_PatternIterator | pattern_last, | ||
strings::search_callback::SearchCallback< _Iterator > * | callback | ||
) | [inline, static] |
Search suffix array and report any matches via #callback
first | points to the start of the sequence |
last | points the the element after the end of the sequence |
array | suffix array corresponding to [first, last) |
pattern_first | points to the start of the pattern |
pattern_last | points to the element after the end of the pattern |
callback | to be called for each match |