Claw  1.7.3
Public Member Functions | List of all members
claw::text::kmp< RandomIterator > Class Template Reference

Exact pattern finding with the Knuth-Morris-Pratt's algorithm. More...

#include <kmp.hpp>

Public Member Functions

template<class UnaryPredicate >
void operator() (const RandomIterator pattern_begin, const RandomIterator pattern_end, const RandomIterator text_begin, const RandomIterator text_end, UnaryPredicate &action) const
 Pattern matching with the Knuth-Morris-Pratt's algorithm.

Detailed Description

template<class RandomIterator>
class claw::text::kmp< RandomIterator >

Exact pattern finding with the Knuth-Morris-Pratt's algorithm.

Author
Julien Jorge

Definition at line 44 of file kmp.hpp.

Member Function Documentation

template<class RandomIterator >
template<class UnaryPredicate >
void claw::text::kmp< RandomIterator >::operator() ( const RandomIterator  pattern_begin,
const RandomIterator  pattern_end,
const RandomIterator  text_begin,
const RandomIterator  text_end,
UnaryPredicate &  action 
) const

Pattern matching with the Knuth-Morris-Pratt's algorithm.

Parameters
pattern_beginIterator on the first item in the pattern.
pattern_endIterator after the last item in the pattern.
text_beginIterator on the first item in the text.
text_endIterator after the last item in the text.
actionPredicate called with the last found position for the pattern.
Remarks
Exits if action return false.
Precondition
pattern_begin != pattern_end

Definition at line 174 of file kmp.tpp.

References claw::it_index< T >::set().


The documentation for this class was generated from the following files: