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

Interface Functions Detail

clear(dictionary)

Clears the dictionary.

Parameters

dictionary The rank dictionary to be cleared.

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).

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.

empty(dictionary)

Returns whether or not the dictionary is empty.

Parameters

dictionary The rank dictionary to be checked.

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.

getSentinelSubstitute(dictionary)

Returns the character used to substitute the sentinel sign.

Parameters

dictionary The dictionary.

getCharacter(dictionary, pos)

Returns the character of a specified position.

Parameters

pos The position
dictionary The rank dictionary.

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.

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.

sentinelPosition(dictionary, pos)

Returns whether a specified position is a sentinel position.

Parameters

pos The position. Types: UnsignedIntegerConcept
dictionary The dictionary.

setSentinelPosition(dictionary, pos)

Sets the sentinel position..

Parameters

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

setSentinelSubstitute(dictionary, character)

Sets the character used to substitute the sentinel sign.

Parameters

character The sentinel substitute.
dictionary The dictionary.