Class
CompressedSAA suffix array storing only a few suffix array entries and computing the remaining on demand.
A suffix array storing only a few suffix array entries and computing the remaining on demand.
Implements | ContainerConcept |
---|---|
All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept |
Defined in | <seqan/index.h> |
Signature |
template <typename TText, typename TSpec, typename TConfig>
class CompressedSA;
|
Template Parameters
TSpec |
Possibility to specialize a compressed suffix array. Default: void. |
---|---|
TText |
The type of the text the compressed suffix array is created from. Types: String, StringSet |
TConfig |
A configuration object that can be used to change the types of the fibres easily. This possibility is provided for convenience. |
Interface Function Overview
-
TIterator begin(compressedSA, tag);
Returns an iterator pointing to the first position of a compresses suffix array. -
void clear(compressedSA);
Resets the compressed suffix array. -
void createCompressedSa(compressedSA, completeSA, compressionFactor[, offset]);
This function creates a compressed suffix array with a specified compression factor. -
bool empty(compressedSA);
Checks whether or not a compressed suffix array contains any elements. -
TIterator end(compressedSA, tag);
Returns an iterator pointing to the position behind the last element of a compresses suffix array. -
TFibre getFibre(compressedSA, fibreTag);
Returns a specific fibre of a compressed suffix array. -
TSize length(compressedSA);
Returns the number of elements in the compressed suffix array. -
bool open(compressedSA, fileName[, mode]);
This functions opens a compressed suffix array from disk. -
TSize resize(compressedSA, newLength);
Resets the number of elements in the compressed suffix array. -
bool save(compressedSA, fileName[, mode]);
This functions saves a compressed suffix array to disk. -
void setFibre(compressedSa, lf, fibreLF);
Set the LF of the compressed suffix array. * -
TValue value(compressedSA, pos);
Returns the value stored at a specified position in the compressed suffix-array.
Interface Functions Inherited From AssignableConcept
Interface Functions Inherited From ContainerConcept
Interface Metafunction Overview
Interface Metafunctions Inherited From ContainerConcept
Detailed Description
Remarks
The compressed suffix array can only be used together with a LF.
Interface Functions Detail
TIterator begin(compressedSA, tag);
Returns an iterator pointing to the first position of a compresses suffix array.
Parameters
compressedSA
|
The compresses suffix array to be traversed. |
---|---|
tag
|
The specialisation of the iterator to be returned by the function. Types: Standard, Rooted |
Returns
TIterator |
Returns an iterator pointing to the first position of a compresses suffix array. Types: The result of Iterator<Index<TText, TIndexSpec>, TSpec>::Type |
---|
Data Races
Thread safety unknown!
void clear(compressedSA);
Resets the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array to be cleared. |
---|
Data Races
Thread safety unknown!
void createCompressedSa(compressedSA, completeSA, compressionFactor[, offset]);
This function creates a compressed suffix array with a specified compression factor.
Parameters
compressedSA
|
The compressed suffix array. |
---|---|
completeSA
|
A complete suffix array containing all values. Types: String |
compressionFactor
|
The compression factor. A compression factor of x means that the compressed suffix array specifically stores a value for every x values in the complete suffix array. Types: UnsignedIntegerConcept |
offset
|
The offset determines how many empty values should be inserted into the compressed suffix array at the beginning. This possibility accounts for the sentinel positions of the FMIndex. |
Data Races
Thread safety unknown!
bool empty(compressedSA);
Checks whether or not a compressed suffix array contains any elements.
Parameters
compressesSA
|
The compressed suffix array to be cleared. |
---|
Returns
bool |
Returns true if the compressed suffix array is empty and false otherwise. |
---|
Data Races
Thread safety unknown!
TIterator end(compressedSA, tag);
Returns an iterator pointing to the position behind the last element of a compresses suffix array.
Parameters
compressedSA
|
The compresses suffix array to be traversed. |
---|---|
tag
|
The specialisation of the iterator to be returned by the function. Types: Standard, Rooted |
Returns
TIterator |
Returns an iterator pointing to the position behind the last element of a compresses suffix array. Types: The result of Iterator<Index<TText, TIndexSpec>, TSpec>::Type |
---|
Data Races
Thread safety unknown!
TFibre getFibre(compressedSA, fibreTag);
Returns a specific fibre of a compressed suffix array.
Parameters
fibreTag
|
A tag that identifies the Fibre. Types: CompressedSAFibres. |
---|---|
compressedSA
|
The container holding the fibre. |
Returns
TFibre |
A reference to the specified fibre of type Fibre<CompressedSA<TText, TSpec, TConfig>, FibreSparseString>::Type. |
---|
Data Races
Thread safety unknown!
TSize length(compressedSA);
Returns the number of elements in the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array. |
---|
Returns
TSize |
The number of elements in the compressed suffix array. Types: The result of Size of the compressed suffix array. |
---|
Data Races
Thread safety unknown!
bool open(compressedSA, fileName[, mode]);
This functions opens a compressed suffix array from disk.
Parameters
compressedSA
|
The compressed suffix array to be opened. |
---|---|
fileName
|
char const * containing the file name. |
mode
|
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(compressedSA, newLength);
Resets the number of elements in the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array. |
---|---|
newLength
|
The number of elements which should be stored in the compressed suffix array. Types: UnsignedIntegerConcept. |
Returns
TSize |
The number of elements in the compressed suffix array. Types: The result of Size of the compressed suffix array. |
---|
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.
Data Races
Thread safety unknown!
bool save(compressedSA, fileName[, mode]);
This functions saves a compressed suffix array to disk.
Parameters
compressedSA
|
The compressed suffix array to be opened. |
---|---|
fileName
|
char const * containing the file name. |
mode
|
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!
void setFibre(compressedSa, lf, fibreLF);
Set the LF of the compressed suffix array. *
Parameters
compressesSa
|
The compressed suffix array. |
---|---|
lf
|
The LF table to be used by the compressed suffix array. |
fibreLF
|
A tag to specify the LF table Fibre |
Data Races
Thread safety unknown!
TValue value(compressedSA, pos);
Returns the value stored at a specified position in the compressed suffix-array.
Parameters
compressedSA
|
The compressed suffix array to access. |
---|---|
pos
|
Position at which to access the suffix array. Types: UnsignedIntegerConcept. |
Note that the compressed suffix array is read only. Therefore a const reference is return by this function.
Data Races
Thread safety unknown!