# Spec PigeonholePattern
Pigeonhole-based pattern. Must be used together with PigeonholeFinder.

Extends | Pattern
All Extended | Pattern
Defined in | <seqan/index/find_pigeonhole.h>
Signature | `template <typename THaystack, typename TSpec> class Pattern<TIndex, Pigeonhole<TSpec> >;`

## Template Parameters

`TSpec` | Specifies the type of pigeonhole filter.
`TIndex` | A q-gram index of needle(s) that should be searched for. Types: IndexQGram

## Interface Function Overview

- `TSize getMaxDeviationOfOrder(pattern);`
  Returns the maximal out-of-order distance of adjacent hits.
- `void maskPatternSequence(pattern, seqNo, enable);`
  Mask and unmask pattern sequence.

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

## Member Variable Overview

- `PigeonholeParameters PigeonholePattern::parameters`
  The pigeonhole parameters to use for configuration.

## Detailed Description

See PigeonholeFinder for more information on the algorithm.

## See Also

- PigeonholeFinder

## Interface Functions Detail

### `TSize getMaxDeviationOfOrder(pattern);`

Returns the maximal out-of-order distance of adjacent hits.

#### Parameters

`pattern` | A PigeonholeFinder.

#### Returns

`TSize` | Returns the maximal distance two adjacent hits can have which are not in increasing order. `TSize` is the size type of the underlying index.

#### Data Races

Thread safety unknown!

### `void maskPatternSequence(pattern, seqNo, enable);`

Note.

Disabling sequences in the pigeonhole filter requires the `ONE_PER_DIAGONAL` heuristic.

Mask and unmask pattern sequence.

#### Parameters

`pattern` | The PigeonholePattern to update.
`seqNo` | Index of the sequence to disable/enable.
`enable` | A `bool` that indicates whether hits are to be generated for the given sequence.

#### Data Races

Thread safety unknown!

## Member Variables Detail

### `PigeonholeParameters PigeonholePattern::parameters`

The pigeonhole parameters to use for configuration.

#### Dox Sources

    /*!
     * @class PigeonholePattern
     *
     * @extends Pattern
     *
     * @headerfile <seqan/index/find_pigeonhole.h>
     *
     * @brief Pigeonhole-based pattern. Must be used together with @link
     *        PigeonholeFinder @endlink.
     *
     * @signature template <typename THaystack, typename TSpec> class
     *            Pattern<TIndex, Pigeonhole<TSpec> >;
     *
     * @tparam TSpec Specifies the type of pigeonhole filter.
     * @tparam TIndex A q-gram index of needle(s) that should be searched for.
     *                Types: @link IndexQGram @endlink
     *
     * See @link PigeonholeFinder @endlink for more information on the algorithm.
     *
     * @see PigeonholeFinder
     *
     * @var PigeonholeParameters PigeonholePattern::parameters;
     *
     * @brief The pigeonhole parameters to use for configuration.
     *
     * @fn PigeonholePattern#maskPatternSequence
     *
     * @headerfile <seqan/index/find_pigeonhole.h>
     *
     * @brief Mask and unmask pattern sequence.
     *
     * @note Disabling sequences in the pigeonhole filter requires the
     *       <tt>ONE_PER_DIAGONAL</tt> heuristic.
     *
     * @signature void maskPatternSequence(pattern, seqNo, enable);
     *
     * @param[in,out] pattern The PigeonholePattern to update.
     * @param[in] seqNo Index of the sequence to disable/enable.
     * @param[in] enable A <tt>bool</tt> that indicates whether hits are to be
     *                   generated for the given sequence.
     *
     * @fn PigeonholePattern#getMaxDeviationOfOrder
     *
     * @headerfile <seqan/index/find_pigeonhole.h>
     *
     * @brief Returns the maximal out-of-order distance of adjacent hits.
     *
     * @signature TSize getMaxDeviationOfOrder(pattern);
     *
     * @param[in] pattern A PigeonholeFinder.
     *
     * @return TSize Returns the maximal distance two adjacent hits can have which
     *               are not in increasing order. <tt>TSize</tt> is the size type of
     *               the underlying index.
     */