{
makewavelet(bwt); // Deletes bwt!
bwt = 0;
+
+ CSA::DeltaVector::Iterator notIndexedIt(notIndexed);
// Make sampling tables
- maketables(numberOfSamples_, tsType, notIndexed, niText);
+ maketables(numberOfSamples_, tsType, notIndexedIt, niText);
}
bool FMIndex::EmptyText(DocId k) const
#endif
}
-void FMIndex::maketables(ulong sampleLength, char tsType, CSA::DeltaVector & notIndexed, const string & niText)
+void FMIndex::maketables(ulong sampleLength, char tsType, CSA::DeltaVector::Iterator & notIndexedIt, const string & niText)
{
// Calculate BWT end-marker position (of last inserted text)
{
if (prevTextId == numberOfTexts)
{
prevTextId = 0;
- while (notIndexed.isSet(prevTextId))
+ while (notIndexedIt.isSet(prevTextId))
++ prevTextId;
// Now prevTextId points to the first indexed Doc ID.
}
/**
* Insert non-indexed texts
*/
- while (notIndexed.isSet(textId))
+ while (notIndexedIt.isSet(textId))
{
do {
tsbuilder[tsb_i] = *nit_i;
// LF-mapping from '\0' does not work with this (pseudo) BWT.
// Correct LF-mapping to the last char of the previous text:
- p = textId - notIndexed.rank(textId);
+ p = textId - notIndexedIt.rank(textId);
}
else // Now c != '\0', do LF-mapping:
p = C[c]+alphabetrank_i_tmp-1;
}
- while (textId > 0 && notIndexed.isSet(textId-1))
+ while (textId > 0 && notIndexedIt.isSet(textId-1))
{
do {
-- tsb_i;
for(ulong i = 0; i < sampleLength; i ++) {
// Find next sampled text position
while ((posOfSuccEndmarker - x) % samplerate != 0
- || notIndexed.isSet(textId)) // Loop over non-indexed
+ || notIndexedIt.isSet(textId)) // Loop over non-indexed
{
--x;
assert(x != ~0lu);