Function
getOccurrences
Returns all occurences of the representative substring or a q-gram in the index text.
Returns the number of occurrences of a specified character from the start
to a specified position.
Include Headers
seqan/index.h
Parameters
An iterator of a suffix tree. Types: VSTree Iterator | |
A q-gram index. Types: IndexQGram | |
A shape object. Types: Shape | |
The wavelet tree. Types: WaveletTree | |
The character. | |
The position |
Remarks
The necessary index tables are built on-demand via indexRequire if index is not const .
Return Values
All positions where the representative of iterator occurs in the text (see EsaText).
If iterator 's container type is TIndex the return type is Infix<Fibre<TIndex, EsaSA>::Type const>::Type .
All positions where the q-gram stored in shape occurs in the text (see QGramText).
If the type of index is TIndex the return type is Infix<Fibre<TIndex, QGramSA>::Type const>::Type .
Member of
Examples
WaveletTree<String<Dna5> > waveletTree(genome);
std::cerr << getOccurrences(waveletTree, 'a', 3) << std::endl; // 1
std::cerr << getOccurrences(waveletTree, 'a', 4) << std::endl; // 2
Example Programs
SeqAn - Sequence Analysis Library - www.seqan.de