![]() |
TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Functions for the Boyer Moore algorithm implementation. More...
Classes | |
| struct | pattern |
| A structure representing all the data we need to search the preprocessed pattern in text. More... | |
Functions | |
| void | init_good_suffix (const std::string &str, std::vector< size_t > &arg) |
| A function that preprocess the good suffix thable. | |
| void | init_bad_char (const std::string &str, std::vector< size_t > &arg) |
| A function that preprocess the bad char table. | |
| void | init_pattern (const std::string &str, pattern &arg) |
| A function that initializes pattern. | |
| std::vector< size_t > | search (const std::string &str, const pattern &arg) |
| A function that implements Boyer-Moore's algorithm. | |
| bool | is_prefix (const char *str, const char *pat, size_t len) |
| Check if pat is prefix of str. | |
Functions for the Boyer Moore algorithm implementation.
| void strings::boyer_moore::init_bad_char | ( | const std::string & | str, |
| std::vector< size_t > & | arg ) |
A function that preprocess the bad char table.
| str | The string being preprocessed |
| arg | The bad char table |
Definition at line 138 of file boyer_moore.cpp.
| void strings::boyer_moore::init_good_suffix | ( | const std::string & | str, |
| std::vector< size_t > & | arg ) |
A function that preprocess the good suffix thable.
| str | The string being preprocessed |
| arg | The good suffix table |
Definition at line 89 of file boyer_moore.cpp.
| void strings::boyer_moore::init_pattern | ( | const std::string & | str, |
| pattern & | arg ) |
A function that initializes pattern.
| str | Text used for initialization |
| arg | Initialized structure |
Definition at line 153 of file boyer_moore.cpp.
| bool strings::boyer_moore::is_prefix | ( | const char * | str, |
| const char * | pat, | ||
| size_t | len ) |
Check if pat is prefix of str.
| str | pointer to some part of the input text. |
| pat | the searched pattern. |
| len | length of the searched pattern |
Definition at line 200 of file boyer_moore.cpp.
| std::vector< size_t > strings::boyer_moore::search | ( | const std::string & | str, |
| const pattern & | arg ) |
A function that implements Boyer-Moore's algorithm.
| str | Text we are seatching in. |
| arg | pattern structure containing the preprocessed pattern |
Definition at line 165 of file boyer_moore.cpp.