Class MultiSearcher
Defined in File MultiSearch.h
Class Documentation
-
class MultiSearcher
the search of many patterns at once, by a SIMD filter or by the automaton of Aho and Corasick
Public Functions
-
explicit MultiSearcher(const std::vector<std::string> &P)
the patterns P, numbered 0 , 1 , … in their order
- Pre:
no pattern is empty
-
std::vector<std::pair<std::size_t, std::size_t>> findAll(std::string_view T) const
the occurrences ( start , number ) of the patterns in T, by increasing start and number
- Post:
the occurrences of naiveMatching() for each pattern (an audit)
-
std::size_t count(std::string_view T) const
the number of the occurrences of the patterns in T
-
inline std::size_t size(void) const
the number of patterns
-
inline bool filtered(void) const
whether the SIMD filter searches (else the shift-or filter)
Public Static Attributes
-
static constexpr std::size_t kFilter = 64
the patterns of more than kFilter go to the shift-or filter
-
explicit MultiSearcher(const std::vector<std::string> &P)