# Spec DPSearchPattern
A dynamic programming algorithm for approximate string-matching with a user-definable scoring function.

Extends | Pattern
All Extended | Pattern
Defined in | <seqan/find.h>
Signature | `template <typename TNeedle, typename TScore[, typename TSpec[, typename TFindBeginPatternSpec]]> class Pattern<TNeedle, DPSearch<TScore[, TSpec[, TFindBeginPatternSpec]]> >;`

## Template Parameters

`TScore` | The scoring function. Types: Score
`TNeedle` | The needle type. Types: String

## 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

The algorithm is based on the Sellers/Needleman-Wunsch dynamic progamming algorithm. The `Pattern` object only contains the right-most column of the dynamic programming matrix.

## Interface Functions Detail

### `TScoreValue getScore(pattern);`

Score of the last found match in approximate searching.

#### Parameters

`pattern` | A DPSearchPattern 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 vlaue is undefined.

#### Data Races

Thread safety unknown!

### `TScoreValue scoreLimit(pattern);`

The minimal score a match must reach in approximate searching.

#### Parameters

`pattern` | The DPSearchPattern to query.

#### Returns

`TScoreValue` | The score limit value.

#### Data Races

Thread safety unknown!

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

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

#### Parameters

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

#### Returns

`TScoreValue` | The score limit value.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @class DPSearchPattern
     *
     * @extends Pattern
     *
     * @headerfile <seqan/find.h>
     *
     * @brief A dynamic programming algorithm for approximate string-matching with a
     *        user-definable scoring function.
     *
     * @signature template <typename TNeedle, typename TScore[, typename TSpec[,
     *            typename TFindBeginPatternSpec]]> class Pattern<TNeedle,
     *            DPSearch<TScore[, TSpec[, TFindBeginPatternSpec]]> >;
     *
     * @tparam TScore The scoring function. Types: Score
     * @tparam TNeedle The needle type. Types: String
     *
     * The algorithm is based on the Sellers/Needleman-Wunsch dynamic progamming
     * algorithm. The <tt>Pattern</tt> object only contains the right-most column of
     * the dynamic programming matrix.
     *
     * @fn DPSearchPattern#scoreLimit
     *
     * @headerfile <seqan/find.h>
     *
     * @brief The minimal score a match must reach in approximate searching.
     *
     * @signature TScoreValue scoreLimit(pattern);
     *
     * @param[in] pattern The DPSearchPattern to query.
     *
     * @return TScoreValue The score limit value.
     *
     * @fn DPSearchPattern#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 DPSearchPattern to set the limit for.
     * @param[in] limit The limit score value to set.
     *
     * @return TScoreValue The score limit value.
     *
     * @fn DPSearchPattern#getScore
     *
     * @headerfile <seqan/find.h>
     *
     * @brief Score of the last found match in approximate searching.
     *
     * @signature TScoreValue getScore(pattern);
     *
     * @param[in] pattern A DPSearchPattern 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 vlaue is undefined.
     */