# Spec PexPattern
Provides a fast approximate string matching filter that splits the needle into several pieces that are searched with a multiple exact string matching algorithm and later verified.

Extends | Pattern
All Extended | Pattern
All Subcl's | HierarchicalPexPattern, NonHierarchicalPexPattern
Defined in | <seqan/find.h>
Signature | `template <typename TNeedle, typename TVerification, typename TMultiFinder> class Pattern<TNeedle, Pex<TVerification, TMultiFinder> >;`

## Template Parameters

`TNeedle` | The needle type. Type: ContainerConcept
`TVerification` | Determines if the hierarchical verification proposed by Navarro and Beaza-Yates is used or not.
`TMultiFinder` | Specifies the algorithm for the multiple exact string matching algorithm. Type: AhoCorasick.

## Interface Function Overview

- `TScoreValue getScore(pattern);`
  Score of the last found match in approximate searching.
- `TScoreValue scoreLimit(pattern);`
  The minimal score a match must reach in approximate searching.
- `void setScoreLimit(pattern, limit);`
  Set the minimal score a match must reach in approximate serach.

### Interface Functions Inherited From Pattern

- `getBeginScore`
- `host`
- `needle`
- `position`
- `scoringScheme`
- `setNeedle`
- `setScoringScheme`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From Pattern

- `Container`
- `Difference`
- `Host`
- `Needle`
- `PexMultiFinder`
- `Position`
- `ScoringScheme`
- `Size`
- `Value`

## Detailed Description

There are two defaults available: `PexHierarchical` and `PexNonHiearchical` (e.g. `Pattern<CharString>, PexHierarchical>` that both use the Aho-Corasick algorithm for the multiple exact string matching.

## Interface Functions Detail

### `TScoreValue getScore(pattern);`

Score of the last found match in approximate searching.

#### Parameters

`pattern` | A pex pattern that can be used for approximate searching.

#### Returns

`TScoreValue` | The score of the last match found using `pattern`. If no match was found then the value is undefined.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TScoreValue scoreLimit(pattern);`

The minimal score a match must reach in approximate searching.

#### Parameters

`pattern` | The pattern to query.

#### Returns

`TScoreValue` | The score limit value.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `void setScoreLimit(pattern, limit);`

Set the minimal score a match must reach in approximate serach.

#### Parameters

`pattern` | The pattern to set the limit for.
`limit` | The limit score value to set.

#### Returns

`TScoreValue` | The score limit value.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### Dox Sources

    /*!
     * @class PexPattern
     *
     * @extends Pattern
     *
     * @headerfile <seqan/find.h>
     *
     * @brief Provides a fast approximate string matching filter that splits the
     *        needle into several pieces that are searched with a multiple exact
     *        string matching algorithm and later verified.
     *
     * @signature template <typename TNeedle, typename TVerification, typename
     *            TMultiFinder> class Pattern<TNeedle, Pex<TVerification,
     *            TMultiFinder> >;
     *
     * @tparam TNeedle The needle type. Type: @link ContainerConcept @endlink
     * @tparam TVerification Determines if the hierarchical verification proposed by
     *                       Navarro and Beaza-Yates is used or not.
     * @tparam TMultiFinder Specifies the algorithm for the multiple exact string
     *                      matching algorithm. Type: AhoCorasick.
     *
     * There are two defaults available: <tt>PexHierarchical</tt> and
     * <tt>PexNonHiearchical</tt> (e.g. <tt>Pattern&lt;CharString&gt;,
     * PexHierarchical&gt;</tt> that both use the @link AhoCorasickPattern Aho-
     * Corasick @endlink algorithm for the multiple exact string matching.
     *
     * @fn PexPattern#getScore
     *
     * @headerfile <seqan/find.h>
     *
     * @brief Score of the last found match in approximate searching.
     *
     * @signature TScoreValue getScore(pattern);
     *
     * @param[in] pattern A pex pattern that can be used for approximate searching.
     *
     * @return TScoreValue The score of the last match found using <tt>pattern</tt>.
     *                     If no match was found then the value is undefined.
     *
     * @fn PexPattern#scoreLimit
     *
     * @headerfile <seqan/find.h>
     *
     * @brief The minimal score a match must reach in approximate searching.
     *
     * @signature TScoreValue scoreLimit(pattern);
     *
     * @param[in] pattern The pattern to query.
     *
     * @return TScoreValue The score limit value.
     *
     * @fn PexPattern#setSoreLimit
     *
     * @headerfile <seqan/find.h>
     *
     * @brief Set the minimal score a match must reach in approximate serach.
     *
     * @signature void setScoreLimit(pattern, limit);
     *
     * @param[in,out] pattern The pattern to set the limit for.
     * @param[in] limit The limit score value to set.
     *
     * @return TScoreValue The score limit value.
     */