StringMatchCount.cpp 381 Bytes
Newer Older
Christophe Rhodes's avatar
Christophe Rhodes committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

#include "StringMatch.hpp"
#include "NaiveStringMatch.hpp"
#include "RKStringMatch.hpp"
#include "KMPStringMatch.hpp"

int main() {
  std::string P = "aaaab";
  std::string T = "";
  StringMatch *matcher = new KMPStringMatch();

  matcher->match(T, P);
  std::cout << "char reads: " << matcher->counter.report() << std::endl;;

  delete matcher;
  return 0;
}