# Spec IndexEsa
An index based on an enhanced suffix array.

Extends | Index
Implements | StringTreeConcept
All Extended | Index
All Impl'd | StringTreeConcept
Defined in | <seqan/index.h>
Signature | `template <typename TText, typename TSpec> class Index<TText, IndexEsa<TSpec> >;`

## Template Parameters

`TText` | The text type.
`TSpec` | The specialization, defaults to `void`.

## Member Function Overview

- `Index::Index();, Index::Index(index);, Index::Index(text);`
  Constructor

## Interface Function Overview

- `TValue bwtAt(position, index);`
  Shortcut for `value(indexBwt(..), ..)`.
- `TValue childAt(position, index);`
  Shortcut for `value(indexChildtab(..), ..)`.
- `void createChildtab(childTab, lcp[, algoTag]);`
  Creates a child table from a given lcp table.
- `TBwt indexBwt(index);`
  Shortcut for `getFibre(.., EsaBwt)`.
- `TChildTab indexChildtab(index);`
  Shortcut for `getFibre(.., EsaChildtab)`.
- `TIsa indexIsa(index);`
  Shortcut for `getFibre(.., EsaIsa)`.
- `TLcp indexLcp(index);`
  Shortcut for `getFibre(.., EsaLcp)`.
- `TLcpe indexLcpe(index);`
  Shortcut for `getFibre(.., EsaLcpe)`.
- `TSA indexSA(index);`
  Shortcut for `getFibre(.., EsaSA)`.
- `TValue isaAt(position, index);`
  Shortcut for `value(indexIsa(..), ..)`.
- `TValue lcpAt(position, index);`
  Shortcut for `value(indexLcp(..), ..)`.
- `TValue lcpeAt(position, index);`
  Shortcut for `value(indexLcpe(..), ..)`.
- `TValue saAt(position, index);`
  Shortcut for `value(indexSA(..), ..)`.
- `TValue textAt(position, index);`
  Shortcut for `value(indexText(..), ..)`.

### Interface Functions Inherited From Index

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

### Interface Functions Inherited From StringTreeConcept

- `resizeVertexMap`
- `begin`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From Index

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

### Interface Metafunctions Inherited From StringTreeConcept

- `Iterator`
- `VertexDescriptor`

## Detailed Description

The fibres (see Index and Fibre) of this index are a suffix array (see EsaSA), a lcp table (see EsaLcp), etc.

This index can be accessed as a Suffix Tree using the VSTreeIterator classes.

## See Also

- IndexEsaFibres

## Member Functions Detail

### `Index::Index(); Index::Index(index); Index::Index(text);`

Constructor

#### Parameters

`index` | Other Index object to copy from.
`text` | The text to be indexed.

#### Data Races

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

## Interface Functions Detail

### `TValue bwtAt(position, index);`

Shortcut for `value(indexBwt(..), ..)`.

#### Parameters

`index` | The IndexEsa object holding the fibre.
`position` | A position in the array on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value.

#### Data Races

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

### `TValue childAt(position, index);`

Shortcut for `value(indexChildtab(..), ..)`.

#### Parameters

`position` | A position in the array on which the value should be accessed.
`index` | The IndexEsa object holding the fibre.

#### Returns

`TValue` | A reference or proxy to the value.

#### Data Races

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

### `void createChildtab(childTab, lcp[, algoTag]);`

Creates a child table from a given lcp table.

#### Parameters

`childTab` | A reference to the resulting child table.
`lcp` | A given lcp table.
`algoTag` | A tag that identifies the algorithm which is used for the creation.

The size of `childTab` must be at least `length(text)` before calling this function.

#### Data Races

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

### `TBwt indexBwt(index);`

Shortcut for `getFibre(.., EsaBwt)`.

#### Parameters

`index` | The IndexEsa object holding the fibre.

#### Returns

`TBwt` | A reference to the EsaBwt fibre (Burrows-Wheeler table).

#### Data Races

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

### `TChildTab indexChildtab(index);`

Shortcut for `getFibre(.., EsaChildtab)`.

#### Parameters

`index` | The Index object holding the fibre.

#### Returns

`TChildTab` | A reference to the EsaChildtab fibre (child table).

#### Data Races

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

### `TIsa indexIsa(index);`

Shortcut for `getFibre(.., EsaIsa)`.

#### Parameters

`index` | The Index object holding the fibre.

#### Returns

`TIsa` | A reference to the inverse suffix array fibre.

#### Data Races

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

### `TLcp indexLcp(index);`

Shortcut for `getFibre(.., EsaLcp)`.

#### Parameters

`index` | The Index object holding the fibre.

#### Returns

`TLcp` | A reference to the EsaLcp fibre (lcp table).

#### Data Races

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

### `TLcpe indexLcpe(index);`

Shortcut for `getFibre(.., EsaLcpe)`.

#### Parameters

`index` | The Index object holding the fibre.

#### Returns

`TLcpe` | A reference to the EsaLcpe fibre (enhanced lcp table).

#### Data Races

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

### `TSA indexSA(index);`

Shortcut for `getFibre(.., EsaSA)`.

#### Parameters

`index` | The Index object holding the fibre.

#### Returns

`TSA` | A reference to the EsaSA fibre (suffix array).

#### Data Races

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

### `TValue isaAt(position, index);`

Shortcut for `value(indexIsa(..), ..)`.

#### Parameters

`index` | The Index object holding the fibre.
`position` | A position in the array on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value in the inverse suffix array.

#### Data Races

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

### `TValue lcpAt(position, index);`

Shortcut for `value(indexLcp(..), ..)`.

#### Parameters

`index` | The Index object holding the fibre.
`position` | A position in the array on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value.

#### Data Races

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

### `TValue lcpeAt(position, index);`

Shortcut for `value(indexLcpe(..), ..)`.

#### Parameters

`index` | The Index object holding the fibre.
`position` | A position in the array on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value.

#### Data Races

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

### `TValue saAt(position, index);`

Shortcut for `value(indexSA(..), ..)`.

#### Parameters

`index` | The Index object holding the fibre.
`position` | A position in the array on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value in the suffix array.

#### Data Races

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

### `TValue textAt(position, index);`

Shortcut for `value(indexText(..), ..)`.

#### Parameters

`index` | The Index object holding the fibre.
`position` | A position in the fibre on which the value should be accessed.

#### Returns

`TValue` | A reference or proxy to the value in the text.

#### Data Races

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

#### Dox Sources

    /*!
     * @class IndexEsa
     *
     * @implements StringTreeConcept
     *
     * @extends Index
     *
     * @headerfile <seqan/index.h>
     *
     * @brief An index based on an enhanced suffix array.
     *
     * @signature template <typename TText, typename TSpec> class Index<TText,
     *            IndexEsa<TSpec> >;
     *
     * @tparam TText The @link TextConcept text type @endlink.
     * @tparam TSpec The specialization, defaults to <tt>void</tt>.
     *
     * The fibres (see @link Index @endlink and @link Fibre @endlink) of this index
     * are a suffix array (see @link IndexEsaFibres#EsaSA @endlink), a lcp table
     * (see @link IndexEsaFibres#EsaLcp @endlink), etc.
     *
     * This index can be accessed as a Suffix Tree using the @link VSTreeIterator
     * @endlink classes.
     *
     * @see IndexEsaFibres
     *
     * @fn IndexEsa::Index
     *
     * @brief Constructor
     *
     * @signature Index::Index();
     * @signature Index::Index(index);
     * @signature Index::Index(text);
     *
     * @param[in] index Other Index object to copy from.
     * @param[in] text The text to be indexed.
     *
     * @fn IndexEsa#textAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexText(..), ..)</tt>.
     *
     * @signature TValue textAt(position, index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     * @param[in] position A position in the fibre on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value in the text.
     *
     * @fn IndexEsa#saAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexSA(..), ..)</tt>.
     *
     * @signature TValue saAt(position, index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value in the suffix array.
     *
     * @fn IndexEsa#isaAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexIsa(..), ..)</tt>.
     *
     * @signature TValue isaAt(position, index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value in the inverse suffix array.
     *
     * @fn IndexEsa#lcpAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexLcp(..), ..)</tt>.
     *
     * @signature TValue lcpAt(position, index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value.
     *
     * @fn IndexEsa#lcpeAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexLcpe(..), ..)</tt>.
     *
     * @signature TValue lcpeAt(position, index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value.
     *
     * @fn IndexEsa#childAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexChildtab(..), ..)</tt>.
     *
     * @signature TValue childAt(position, index);
     *
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     * @param[in] index The @link IndexEsa @endlink object holding the fibre.
     *
     * @return TValue A reference or proxy to the value.
     *
     * @fn IndexEsa#bwtAt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>value(indexBwt(..), ..)</tt>.
     *
     * @signature TValue bwtAt(position, index);
     *
     * @param[in] index The @link IndexEsa @endlink object holding the fibre.
     * @param[in] position A position in the array on which the value should be
     *                     accessed.
     *
     * @return TValue A reference or proxy to the value.
     *
     * @fn IndexEsa#indexSA
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaSA)</tt>.
     *
     * @signature TSA indexSA(index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     *
     * @return TSA A reference to the @link IndexEsaFibres#EsaSA @endlink fibre
     *             (suffix array).
     *
     * @fn IndexEsa#indexIsa
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaIsa)</tt>.
     *
     * @signature TIsa indexIsa(index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     *
     * @return TIsa A reference to the inverse suffix array fibre.
     *
     * @fn IndexEsa#indexLcp
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaLcp)</tt>.
     *
     * @signature TLcp indexLcp(index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     *
     * @return TLcp A reference to the @link IndexEsaFibres#EsaLcp @endlink fibre
     *              (lcp table).
     *
     * @fn IndexEsa#indexLcpe
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaLcpe)</tt>.
     *
     * @signature TLcpe indexLcpe(index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     *
     * @return TLcpe A reference to the @link IndexEsaFibres#EsaLcpe @endlink fibre
     *               (enhanced lcp table).
     *
     * @fn IndexEsa#indexBwt
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaBwt)</tt>.
     *
     * @signature TBwt indexBwt(index);
     *
     * @param[in] index The @link IndexEsa @endlink object holding the fibre.
     *
     * @return TBwt A reference to the @link IndexEsaFibres#EsaBwt @endlink fibre
     *              (Burrows-Wheeler table).
     *
     * @fn IndexEsa#indexChildtab
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Shortcut for <tt>getFibre(.., EsaChildtab)</tt>.
     *
     * @signature TChildTab indexChildtab(index);
     *
     * @param[in] index The @link Index @endlink object holding the fibre.
     *
     * @return TChildTab A reference to the @link IndexEsaFibres#EsaChildtab
     *                   @endlink fibre (child table).
     *
     * @fn IndexEsa#createChildtab
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Creates a child table from a given lcp table.
     *
     * @signature void createChildtab(childTab, lcp[, algoTag]);
     *
     * @param[out] childTab A reference to the resulting child table.
     * @param[in] lcp A given lcp table.
     * @param[in] algoTag A tag that identifies the algorithm which is used for the
     *                    creation.
     *
     * The size of <tt>childTab</tt> must be at least <tt>length(text)</tt> before
     * calling this function.
     */