/*!
* @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#saAt
*
* @headerfile <seqan/index.h>
*
* @brief Shortcut for <tt>value(indexSA(..), ..)</tt>.
*
* @note Advanced functionality, not commonly used.
*
* @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. To be
* more precise, a reference to a position containing a value of
* type @link SAValue @endlink is returned (or a proxy). SAValue
*
* @section Examples
*
* The following code shows how the BWT of a text can be computed.
*
* @include demos/index/index_textAt_indexText_saAt_indexRequire.cpp
*
* @code{.output}
* BWT Suffices
* P PI
* S SIPPI
* S SISSIPPI
* M MISSISSIPPI
* I I
* P PPI
* I IPPI
* S SSIPPI
* S SSISSIPPI
* I ISSIPPI
* I ISSISSIPPI
* @endcode
*
*
* @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 suffix array fibre.
*
* @section Examples
*
* The following code shows how the BWT of a text can be computed.
*
* @include demos/index/index_textAt_indexText_saAt_indexRequire.cpp
*
* The output is as follows:
*
* @code{.output}
* BWT Suffices
* P PI
* S SIPPI
* S SISSIPPI
* M MISSISSIPPI
* I I
* P PPI
* I IPPI
* S SSIPPI
* S SSISSIPPI
* I ISSIPPI
* I ISSISSIPPI
* @endcode
*
*
* @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.
*/