-/*
- * Not supported
-uchar * CSA::Substring(TextPosition i, TextPosition l) const
-{
- uchar *result = new uchar[l + 1];
- if (l == 0)
- {
- result[0] = 0u;
- return result;
- }
-
- TextPosition dist;
- TextPosition k = i + l - 1;
- // Check for end of the string
- if (k > n - 1)
- {
- l -= k - n + 1;
- k = n - 1;
- }
-
- TextPosition skip = samplerate - k % samplerate - 1;
- TextPosition j;
- if (k / samplerate + 1 >= n / samplerate)
- {
- j = bwtEndPos;
- skip = n - k - 1;
- }
- else
- {
- j = (*positions)[k/samplerate+1];
- //cout << samplerate << ' ' << j << '\n';
- }
-
- for (dist = 0; dist < skip + l; dist++)
- {
- int c = alphabetrank->access(j); //charAtPos(j, &alphabetrank_tmp);
- if (c == '\0')
- {
- // Rank among the end-markers in BWT
- unsigned endmarkerRank = alphabetrank->rank(0, j) - 1;
- j = (*endmarkerDocId)[endmarkerRank]; // LF-mapping for end-marker
- }
- else
- j = C[c]+alphabetrank->rank(c,j)-1; // LF-mapping
- if (dist >= skip)
- result[l + skip - dist - 1] = c;
- }
- result[l] = 0u;
- return result;
-}
-*/
- /*TextPosition CSA::inverse(TextPosition i)
-{
- TextPosition skip = samplerate - i % samplerate;
- TextPosition j;
- if (i / samplerate + 1 >= n / samplerate)
- {
- j = bwtEndPos;
- skip = n - i;
- }
- else
- {
- j = (*positions)[i/samplerate+1];
- //cout << samplerate << ' ' << j << '\n';
- }
-
- while (skip > 0)
- {
- int c = alphabetrank->charAtPos(j);
- j = C[c]+alphabetrank->rank(c,j)-1; // LF-mapping
- skip --;
- }
- return j;
- }*/