Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Namespaces | Functions
pattern_match.h File Reference
#include <algorithm>
#include <string>
#include <unordered_map>
Include dependency graph for pattern_match.h:

Namespaces

namespace  dsac
 Code from the zyBook "Data Structures and Algorithms in C++" by Goodrich/Tamassia/Mount/Goldwasser.
 
namespace  dsac::text
 Code from the chapter "Text Processing".
 

Functions

int dsac::text::find_brute (const std::string &text, const std::string &pattern)
 Returns the lowest index at which substring pattern begins in text (or else -1)
 
int dsac::text::find_boyer_moore (const std::string &text, const std::string &pattern)
 Returns the lowest index at which substring pattern begins in text (or else -1).
 
std::vector< intdsac::text::compute_kmp_fail (const std::string &pattern)
 Returns the failure table for Knuth, Morris Pratt algorithm.
 
int dsac::text::find_kmp (const std::string &text, const std::string &pattern)
 Returns the lowest index at which substring pattern begins in text (or else -1).