|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Illustrative example for KMP pattern matching. More...
Go to the source code of this file.
Functions | |
| int | main () |
| Example program demonstrating KMP prefix computation and pattern search. | |
Illustrative example for KMP pattern matching.
Definition in file kmp_example.cc.
| int main | ( | ) |
Example program demonstrating KMP prefix computation and pattern search.
Computes the prefix function for a hard-coded pattern, finds all occurrences of that pattern in a hard-coded text using the library's KMP routines, and prints the text, pattern, prefix function values, and match positions to standard output.
Definition at line 54 of file kmp_example.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::kmp_prefix_function(), and Aleph::kmp_search().