# Spec OpenAddressingQGramIndex
A q-gram that uses open addressing hashing instead of an array.

Extends | IndexQGram
All Extended | Index, IndexQGram
Defined in | <seqan/index.h>
Signature | `template <typename TIndex, typename TShapeSpec> class Index<TText, IndexQGram<TShapeSpec, OpenAddressing> >;`

## Template Parameters

`TText` | The text type.
`TShapeSpec` | The Shape specialization type.

## Interface Function Overview

### Interface Functions Inherited From Index

- `clear`
- `countSequences`
- `getFibre`
- `indexCreate`
- `indexRawText`
- `indexRequire`
- `indexSupplied`
- `indexText`
- `length`
- `open`
- `rawtextAt`
- `save`

### Interface Functions Inherited From IndexQGram

- `countOccurrences`
- `countOccurrencesMultiple`
- `createCountArray`
- `createQGramIndex`
- `createQGramIndexDirOnly`
- `createQGramIndexSAOnly`
- `dirAt`
- `getKmerSimilarityMatrix`
- `getOccurrence`
- `getOccurrences`
- `getStepSize`
- `indexBucketMap`
- `indexCounts`
- `indexCountsDir`
- `indexDir`
- `indexSA`
- `indexShape`
- `range`
- `saAt`
- `setStepSize`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From Index

- `DefaultIndexCreator`
- `DefaultIndexSpec`
- `DefaultIndexStringSpec`
- `GetVSTreeIteratorTraits`
- `Size`

## Member Variable Overview

- `double OpenAddressingQGramIndex::alpha`
  Load factor. Controls space/time-tradeoff and must be greater 1. Default value is 1.6.

## Detailed Description

This index uses a non-trivial hashing for mapping q-gram hash values to buckets. This reduces the sizes of bucket directories (QGramDir, QGramCountsDir fibres) from Σq to min(α · n, \Sigmaq), for a load factor α > 1. A bucket still stores occurrences (or counts) of the same q-gram, but in contrast to the IndexQGram index, buckets are in random order due to the hashing.

## Member Variables Detail

### `double OpenAddressingQGramIndex::alpha`

Load factor. Controls space/time-tradeoff and must be greater 1. Default value is 1.6.

#### Dox Sources

    /*!
     * @class OpenAddressingQGramIndex
     *
     * @extends IndexQGram
     *
     * @headerfile <seqan/index.h>
     *
     * @brief A <i>q</i>-gram that uses open addressing hashing instead of an array.
     *
     * @signature template <typename TIndex, typename TShapeSpec> class Index<TText,
     *            IndexQGram<TShapeSpec, OpenAddressing> >;
     *
     * @tparam TText The @link TextConcept text type @endlink.
     * @tparam TShapeSpec The @link Shape @endlink specialization type.
     *
     * This index uses a non-trivial hashing for mapping q-gram hash values to
     * buckets. This reduces the sizes of bucket directories (QGramDir,
     * QGramCountsDir fibres) from &Sigma;<i><sup>q</sup></i> to min(<i>&alpha;
     * &middot; n</i>, \Sigma<i><sup>q</sup></i>), for a load factor <i>&alpha; &gt;
     * 1</i>. A bucket still stores occurrences (or counts) of the same
     * <i>q</i>-gram, but in contrast to the @link IndexQGram @endlink index,
     * buckets are in random order due to the hashing.
     *
     * @var double OpenAddressingQGramIndex::alpha;
     *
     * @brief Load factor. Controls space/time-tradeoff and must be greater 1.
     *        Default value is 1.6.
     */