| Home | Libraries | People | FAQ | More

## Class template knuth_morris_pratt

boost::algorithm::knuth_morris_pratt

## Synopsis

    // In header: <boost/algorithm/searching/knuth_morris_pratt.hpp>

    template<typename patIter>
    class knuth_morris_pratt {
    public:

      // public member functions
      knuth_morris_pratt(patIter, patIter);
      ~knuth_morris_pratt();
      template<typename corpusIter>
        std::pair< corpusIter, corpusIter >
        operator()(corpusIter, corpusIter) const;
      template<typename Range>
        std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type >
        operator()(Range &) const;
    };

## Description

### `knuth_morris_pratt` public member functions

1.     knuth_morris_pratt(patIter first, patIter last);

2.     ~knuth_morris_pratt();

3.     template<typename corpusIter>
         std::pair< corpusIter, corpusIter >
         operator()(corpusIter corpus_first, corpusIter corpus_last) const;

4.     template<typename Range>
         std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type >
         operator()(Range & r) const;