# Class SentinelRankDictionary
A rank dictionary, additional storing sentinel character which are not accounted for in a rank query.

Defined in | <seqan/index.h>
Signature | `template <typename TRankDictionary, typename TSpec> class SentinelRankDictionary;`

## Template Parameters

`TSpec` | Specialisation
`TRankDictionary` | The rank dictionary of a text.

## Interface Function Overview

- `clear(dictionary)`
  Clears the dictionary.
- `TSize countOccurrences(dictionary, character, pos);`
  Returns the number of occurrences of a specified character from the start to a specified position.
- `void createSentinelRankDictionary(dictionary, text)`
  This functions creates the dictionary structure.
- `empty(dictionary)`
  Returns whether or not the dictionary is empty.
- `getFibre(dictionary, fibreTag)`
  Returns a specific fibre of a dictionary.
- `getSentinelSubstitute(dictionary)`
  Returns the character used to substitute the sentinel sign.
- `getCharacter(dictionary, pos)`
  Returns the character of a specified position.
- `open(dictionary, fileName [, openMode])`
  This functions loads a dictionary from disk.
- `save(dictionary, fileName [, openMode])`
  This functions saves a dictionary to disk.
- `sentinelPosition(dictionary, pos)`
  Returns whether a specified position is a sentinel position.
- `setSentinelPosition(dictionary, pos)`
  Sets the sentinel position..
- `setSentinelSubstitute(dictionary, character)`
  Sets the character used to substitute the sentinel sign.

## Interface Functions Detail

### `clear(dictionary)`

Clears the dictionary.

#### Parameters

`dictionary` | The rank dictionary to be cleared.

#### Data Races

Thread safety unknown!

### `TSize countOccurrences(dictionary, character, pos);`

Returns the number of occurrences of a specified character from the start to a specified position.

#### Parameters

`dictionary` | The dictionary.
`character` | The character.
`pos` | The position (which is included in the counting).

#### Returns

`TSize` | The number of occurences (Metafunction: Size).

#### Data Races

Thread safety unknown!

### `void createSentinelRankDictionary(dictionary, text)`

This functions creates the dictionary structure.

#### Parameters

`text` | A text to be transfered into a dictionary. Types: String
`dictionary` | The dictionary.

#### Data Races

Thread safety unknown!

### `empty(dictionary)`

Returns whether or not the dictionary is empty.

#### Parameters

`dictionary` | The rank dictionary to be checked.

#### Data Races

Thread safety unknown!

### `getFibre(dictionary, fibreTag)`

Returns a specific fibre of a dictionary.

#### Parameters

`fibreTag` | A tag that identifies the Fibre. Types: SentinelRankDictionary Fibres.
`dictionary` | The dictionary holding the fibre.

#### Returns

`TReturn` | A reference to the Fibre object.

#### Data Races

Thread safety unknown!

### `getSentinelSubstitute(dictionary)`

Returns the character used to substitute the sentinel sign.

#### Parameters

`dictionary` | The dictionary.

#### Data Races

Thread safety unknown!

### `getCharacter(dictionary, pos)`

Returns the character of a specified position.

#### Parameters

`pos` | The position
`dictionary` | The rank dictionary.

#### Data Races

Thread safety unknown!

### `open(dictionary, fileName [, openMode])`

This functions loads a dictionary from disk.

#### Parameters

`openMode` | The combination of flags defining how the file should be opened.To open a file read-only, write-only or to read and write use `OPEN_RDONLY`, `OPEN_WRONLY`, or `OPEN_RDWR`.To create or overwrite a file add `OPEN_CREATE`.To append a file if existing add `OPEN_APPEND`.To circumvent problems, files are always opened in binary mode. Default: `OPEN_RDWR | OPEN_CREATE | OPEN_APPEND`
`dictionary` | The dictionary. Types: SentinelRankDictionary
`fileName` | C-style character string containing the file name.

#### Returns

`TReturn` | A `bool` which is `true` on success.

#### Data Races

Thread safety unknown!

### `save(dictionary, fileName [, openMode])`

This functions saves a dictionary to disk.

#### Parameters

`openMode` | The combination of flags defining how the file should be opened.To open a file read-only, write-only or to read and write use `OPEN_RDONLY`, `OPEN_WRONLY`, or `OPEN_RDWR`.To create or overwrite a file add `OPEN_CREATE`.To append a file if existing add `OPEN_APPEND`.To circumvent problems, files are always opened in binary mode. Default: `OPEN_RDWR | OPEN_CREATE | OPEN_APPEND`
`dictionary` | The dictionary. Types: SentinelRankDictionary
`fileName` | C-style character string containing the file name.

#### Returns

`TReturn` | A `bool` which is `true` on success.

#### Data Races

Thread safety unknown!

### `sentinelPosition(dictionary, pos)`

Returns whether a specified position is a sentinel position.

#### Parameters

`pos` | The position. Types: UnsignedIntegerConcept
`dictionary` | The dictionary.

#### Data Races

Thread safety unknown!

### `setSentinelPosition(dictionary, pos)`

Sets the sentinel position..

#### Parameters

`pos` | The sentinel position. Types: UnsignedIntegerConcept
`dictionary` | The dictionary.

#### Data Races

Thread safety unknown!

### `setSentinelSubstitute(dictionary, character)`

Sets the character used to substitute the sentinel sign.

#### Parameters

`character` | The sentinel substitute.
`dictionary` | The dictionary.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @class SentinelRankDictionary
     *
     * @headerfile <seqan/index.h>
     *
     * @brief A rank dictionary, additional storing sentinel character which are not
     *        accounted for in a rank query.
     *
     * @signature template <typename TRankDictionary, typename TSpec> class
     *            SentinelRankDictionary;
     *
     * @tparam TSpec Specialisation
     * @tparam TRankDictionary The rank dictionary of a text.
     *
     * @fn SentinelRankDictionary#clear
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Clears the dictionary.
     *
     * @signature clear(dictionary)
     *
     * @param dictionary The rank dictionary to be cleared.
     *
     * @fn SentinelRankDictionary#sentinelPosition
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns whether a specified position is a sentinel position.
     *
     * @signature sentinelPosition(dictionary, pos)
     *
     * @param pos The position. Types: @link UnsignedIntegerConcept @endlink
     * @param dictionary The dictionary.
     *
     * @fn SentinelRankDictionary#empty
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns whether or not the dictionary is empty.
     *
     * @signature empty(dictionary)
     *
     * @param dictionary The rank dictionary to be checked.
     *
     * @fn SentinelRankDictionary#getValue
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the character of a specified position.
     *
     * @signature getCharacter(dictionary, pos)
     *
     * @param pos The position
     * @param dictionary The rank dictionary.
     *
     * @fn SentinelRankDictionary#getFibre
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns a specific fibre of a dictionary.
     *
     * @signature getFibre(dictionary, fibreTag)
     *
     * @param fibreTag A tag that identifies the @link Fibre @endlink. Types: @link
     *                 SentinelRankDictionaryFibres SentinelRankDictionary Fibres
     *                 @endlink.
     * @param dictionary The dictionary holding the fibre.
     *
     * @return TReturn A reference to the @link Fibre @endlink object.
     *
     * @fn SentinelRankDictionary#countOccurrences
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the number of occurrences of a specified character from the
     *        start to a specified position.
     *
     * @signature TSize countOccurrences(dictionary, character, pos);
     *
     * @param[in] dictionary The dictionary.
     * @param[in] character The character.
     * @param[in] pos The position (which is included in the counting).
     *
     * @return TSize The number of occurences (Metafunction: @link Index#Size
     *               @endlink).
     *
     * @fn SentinelRankDictionary#getSentinelSubstitute
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the character used to substitute the sentinel sign.
     *
     * @signature getSentinelSubstitute(dictionary)
     *
     * @param dictionary The dictionary.
     *
     * @fn SentinelRankDictionary#setSentinelSubstitute
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Sets the character used to substitute the sentinel sign.
     *
     * @signature setSentinelSubstitute(dictionary, character)
     *
     * @param character The sentinel substitute.
     * @param dictionary The dictionary.
     *
     * @fn SentinelRankDictionary#setSentinelPosition
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Sets the sentinel position..
     *
     * @signature setSentinelPosition(dictionary, pos)
     *
     * @param pos The sentinel position. Types: @link UnsignedIntegerConcept
     *            @endlink
     * @param dictionary The dictionary.
     *
     * @fn SentinelRankDictionary#createSentinelRankDictionary
     *
     * @headerfile <seqan/index.h>
     *
     * @brief This functions creates the dictionary structure.
     *
     * @signature void createSentinelRankDictionary(dictionary, text)
     *
     * @param text A text to be transfered into a dictionary. Types: @link String
     *             @endlink
     * @param dictionary The dictionary.
     *
     * @fn SentinelRankDictionary#save
     *
     * @headerfile <seqan/index.h>
     *
     * @brief This functions saves a dictionary to disk.
     *
     * @signature save(dictionary, fileName [, openMode])
     *
     * @param openMode The combination of flags defining how the file should be
     *                 opened.To open a file read-only, write-only or to read and
     *                 write use <tt>OPEN_RDONLY</tt>, <tt>OPEN_WRONLY</tt>, or
     *                 <tt>OPEN_RDWR</tt>.To create or overwrite a file add
     *                 <tt>OPEN_CREATE</tt>.To append a file if existing add
     *                 <tt>OPEN_APPEND</tt>.To circumvent problems, files are always
     *                 opened in binary mode. Default: <tt>OPEN_RDWR | OPEN_CREATE |
     *                 OPEN_APPEND</tt>
     * @param dictionary The dictionary. Types: SentinelRankDictionary
     * @param fileName C-style character string containing the file name.
     *
     * @return TReturn A <tt>bool</tt> which is <tt>true</tt> on success.
     *
     * @fn SentinelRankDictionary#open
     *
     * @headerfile <seqan/index.h>
     *
     * @brief This functions loads a dictionary from disk.
     *
     * @signature open(dictionary, fileName [, openMode])
     *
     * @param openMode The combination of flags defining how the file should be
     *                 opened.To open a file read-only, write-only or to read and
     *                 write use <tt>OPEN_RDONLY</tt>, <tt>OPEN_WRONLY</tt>, or
     *                 <tt>OPEN_RDWR</tt>.To create or overwrite a file add
     *                 <tt>OPEN_CREATE</tt>.To append a file if existing add
     *                 <tt>OPEN_APPEND</tt>.To circumvent problems, files are always
     *                 opened in binary mode. Default: <tt>OPEN_RDWR | OPEN_CREATE |
     *                 OPEN_APPEND</tt>
     * @param dictionary The dictionary. Types: SentinelRankDictionary
     * @param fileName C-style character string containing the file name.
     *
     * @return TReturn A <tt>bool</tt> which is <tt>true</tt> on success.
     */