Class
SentinelRankDictionaryA rank dictionary, additional storing sentinel character which are not
accounted for in a rank query.
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
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
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 occurrences (Metafunction: Size). |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
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
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
empty(dictionary)
Returns whether or not the dictionary is empty.
Parameters
dictionary
|
The rank dictionary to be checked. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
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
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
getSentinelSubstitute(dictionary)
Returns the character used to substitute the sentinel sign.
Parameters
dictionary
|
The dictionary. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
getCharacter(dictionary, pos)
Returns the character of a specified position.
Parameters
pos
|
The position |
---|---|
dictionary
|
The rank dictionary. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
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
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
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
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
sentinelPosition(dictionary, pos)
Returns whether a specified position is a sentinel position.
Parameters
pos
|
The position. Types: UnsignedIntegerConcept |
---|---|
dictionary
|
The dictionary. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
setSentinelPosition(dictionary, pos)
Sets the sentinel position..
Parameters
pos
|
The sentinel position. Types: UnsignedIntegerConcept |
---|---|
dictionary
|
The dictionary. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
setSentinelSubstitute(dictionary, character)
Sets the character used to substitute the sentinel sign.
Parameters
character
|
The sentinel substitute. |
---|---|
dictionary
|
The dictionary. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.