Class SparseString
A string storing only a fraction of the values of the original string.

Defined in <seqan/index.h>
Signature template <typename TValueString, typename TSpec> class SparseString;

Template Parameters

TSpec The specialisation tag. Default: void.
TValueString The type of the string containing the values.

Interface Function Overview

Interface Functions Detail

void clear(sparseString);

Resets the SparseString.

Parameters

sparseString The SparseString to be cleared.

Data Races

Thread safety unknown!

bool empty(sparseString);

Returns whether or not the SparseString is empty.

Parameters

sparseString The SparseString to be checked.

Returns

bool true if there are no elements in the sparse string and false otherwise.

Data Races

Thread safety unknown!

TFibre getFibre(sparseString, fibreTag);

Returns a specific fibre of a SparseString.

Parameters

sparseString The sparseString holding the fibre.
fibreTag A tag that identifies the Fibre. Types: SparseString Fibres

Returns

TFibre A reference to the Fibre object.

Data Races

Thread safety unknown!

TValue getValue(sparseString, pos);

Returns the value of a SparseString.

Parameters

sparseString The SparseString.
pos The position at which a value should be assign to the sparse string. Types: UnsignedIntegerConcept

Returns

TValue The type GetValue of SparseString is returned.

Data Races

Thread safety unknown!

TSize length(sparseString);

Returns the number of elements in the SparseString.

Parameters

sparseString The sparse string suffix array.

Returns

TSize The number of elements in the sparse string array. Types: The result of Size of the sparse string.

Data Races

Thread safety unknown!

bool open(string, fileName[, openMode]);

This functions open a sparse string from disk.

Parameters

string The string to be opened. Types: SparseString
fileName C-style character string containing the file name.
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

Returns

bool true on success.

Data Races

Thread safety unknown!

TSize resize(sparseString, newLength);

Note.

If the new length is smaller than the actual one then the last x items of the compressed suffix array are deleted with x = oldLength - newLength.

Resets the number of elements in the compressed suffix array.

Parameters

sparseString The sparse string.
newLength The number of elements which should be stored in the sparse string. Types: UnsignedIntegerConcept.

Returns

TSize The number of elements in the sparse string. Types: The result of Size of the sparse string.

Data Races

Thread safety unknown!

bool save(string, fileName[, openMode]);

This functions saves a sparse string to disk.

Parameters

string The string to be saved. Types: SparseString
fileName C-style character string containing the file name.
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

Returns

bool true on success.

Data Races

Thread safety unknown!

TReference value(sparseString, pos);

Returns the value of a SparseString.

Parameters

sparseString The SparseString.
pos The position at which a value should be assign to the sparse string. Types: UnsignedIntegerConcept

Returns

TReference The type Reference of SparseString is returned.

Data Races

Thread safety unknown!