Lines Matching refs:nIndex

257     size_t nIndex;  in CopyFrom()  local
262 rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) : in CopyFrom()
263 rArray.GetNextValue( nIndex, nRegionEnd)); in CopyFrom()
276 size_t nIndex = Search( nStart); in Insert() local
280 if (nIndex > 0 && pData[nIndex-1].nEnd+1 == nStart) in Insert()
281 --nIndex; in Insert()
282 const D& rValue = pData[nIndex].aValue; // the value "copied" in Insert()
285 pData[nIndex].nEnd += nAccessCount; in Insert()
286 if (pData[nIndex].nEnd >= nMaxAccess) in Insert()
288 pData[nIndex].nEnd = nMaxAccess; in Insert()
289 nCount = nIndex + 1; // discard trailing entries in Insert()
291 } while (++nIndex < nCount); in Insert()
300 size_t nIndex = Search( nStart); in Remove() local
302 if (nEnd > pData[nIndex].nEnd) in Remove()
303 SetValue( nStart, nEnd, pData[nIndex].aValue); in Remove()
305 if ((nStart == 0 || (nIndex > 0 && nStart == pData[nIndex-1].nEnd+1)) && in Remove()
306 pData[nIndex].nEnd == nEnd && nIndex < nCount-1) in Remove()
313 if (nIndex > 0 && pData[nIndex-1].aValue == pData[nIndex+1].aValue) in Remove()
316 --nIndex; in Remove()
320 memmove( pData + nIndex, pData + nIndex + nRemove, (nCount - (nIndex + in Remove()
327 pData[nIndex].nEnd -= nAccessCount; in Remove()
328 } while (++nIndex < nCount); in Remove()
337 size_t nIndex = nCount-1; in GetLastUnequalAccess() local
340 if (pData[nIndex].aValue != rCompare) in GetLastUnequalAccess()
342 nEnd = pData[nIndex].nEnd; in GetLastUnequalAccess()
347 if (nIndex > 0) in GetLastUnequalAccess()
349 --nIndex; in GetLastUnequalAccess()
350 if (pData[nIndex].nEnd < nStart) in GetLastUnequalAccess()
366 size_t nIndex = this->Search( nStart); in SumValues() local
367 unsigned long nSum = SumValuesContinuation( nStart, nEnd, nIndex); in SumValues()
376 A nStart, A nEnd, size_t& nIndex ) const in SumValuesContinuation()
380 while (nIndex < this->nCount && nS <= nEnd) in SumValuesContinuation()
382 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in SumValuesContinuation()
384 unsigned long nNew = (unsigned long) this->pData[nIndex].aValue * (nE - nS + 1); in SumValuesContinuation()
390 ++nIndex; in SumValuesContinuation()
398 A nStart, A nEnd, size_t& nIndex, double fScale ) const in SumScaledValuesContinuation() argument
402 while (nIndex < this->nCount && nS <= nEnd) in SumScaledValuesContinuation()
404 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in SumScaledValuesContinuation()
405 unsigned long nScaledVal = (unsigned long) (this->pData[nIndex].aValue * fScale); in SumScaledValuesContinuation()
413 ++nIndex; in SumScaledValuesContinuation()
428 size_t nIndex = this->Search( nStart); in AndValue() local
431 if ((this->pData[nIndex].aValue & rValueToAnd) != this->pData[nIndex].aValue) in AndValue()
433 A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart); in AndValue()
434 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in AndValue()
435 this->SetValue( nS, nE, this->pData[nIndex].aValue & rValueToAnd); in AndValue()
438 nIndex = this->Search( nE + 1); in AndValue()
440 else if (this->pData[nIndex].nEnd >= nEnd) in AndValue()
443 ++nIndex; in AndValue()
444 } while (nIndex < this->nCount); in AndValue()
455 size_t nIndex = this->Search( nStart); in OrValue() local
458 if ((this->pData[nIndex].aValue | rValueToOr) != this->pData[nIndex].aValue) in OrValue()
460 A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart); in OrValue()
461 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in OrValue()
462 this->SetValue( nS, nE, this->pData[nIndex].aValue | rValueToOr); in OrValue()
465 nIndex = this->Search( nE + 1); in OrValue()
467 else if (this->pData[nIndex].nEnd >= nEnd) in OrValue()
470 ++nIndex; in OrValue()
471 } while (nIndex < this->nCount); in OrValue()
480 size_t nIndex; in CopyFromAnded() local
485 rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) : in CopyFromAnded()
486 rArray.GetNextValue( nIndex, nRegionEnd)); in CopyFromAnded()
501 size_t nIndex; in CopyFromOred() local
506 rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) : in CopyFromOred()
507 rArray.GetNextValue( nIndex, nRegionEnd)); in CopyFromOred()
522 size_t nIndex = this->Search( nEnd); in GetBitStateStart() local
523 while ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in GetBitStateStart()
525 if (nIndex > 0) in GetBitStateStart()
527 --nIndex; in GetBitStateStart()
528 nStart = this->pData[nIndex].nEnd + 1; in GetBitStateStart()
545 size_t nIndex = this->Search( nStart); in GetBitStateEnd() local
546 while (nIndex < this->nCount && (this->pData[nIndex].aValue & rBitMask) == in GetBitStateEnd()
549 nEnd = this->pData[nIndex].nEnd; in GetBitStateEnd()
550 ++nIndex; in GetBitStateEnd()
560 size_t nIndex = this->Search( nStart); in GetFirstForCondition() local
563 if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in GetFirstForCondition()
565 A nFound = nIndex > 0 ? this->pData[nIndex-1].nEnd + 1 : 0; in GetFirstForCondition()
568 if (this->pData[nIndex].nEnd >= nEnd) in GetFirstForCondition()
570 ++nIndex; in GetFirstForCondition()
571 } while (nIndex < this->nCount); in GetFirstForCondition()
580 size_t nIndex = this->Search( nEnd); in GetLastForCondition() local
583 if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in GetLastForCondition()
584 return ::std::min( this->pData[nIndex].nEnd, nEnd); in GetLastForCondition()
586 if (nIndex > 0) in GetLastForCondition()
588 --nIndex; in GetLastForCondition()
589 if (this->pData[nIndex].nEnd < nStart) in GetLastForCondition()
604 size_t nIndex = this->Search( nStart); in CountForCondition() local
607 if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in CountForCondition()
609 A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart); in CountForCondition()
610 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in CountForCondition()
613 if (this->pData[nIndex].nEnd >= nEnd) in CountForCondition()
615 ++nIndex; in CountForCondition()
616 } while (nIndex < this->nCount); in CountForCondition()
627 size_t nIndex = this->Search( nStart); in FillArrayForCondition() local
628 while (nIndex < this->nCount && nUsed < nArraySize) in FillArrayForCondition()
630 if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in FillArrayForCondition()
632 A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart); in FillArrayForCondition()
633 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in FillArrayForCondition()
637 if (this->pData[nIndex].nEnd >= nEnd) in FillArrayForCondition()
639 ++nIndex; in FillArrayForCondition()
649 size_t nIndex = this->Search( nStart); in HasCondition() local
652 if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare) in HasCondition()
654 if (this->pData[nIndex].nEnd >= nEnd) in HasCondition()
656 ++nIndex; in HasCondition()
657 } while (nIndex < this->nCount); in HasCondition()
667 size_t nIndex = this->Search( nStart); in CountForAnyBitCondition() local
670 if ((this->pData[nIndex].aValue & rBitMask) != 0) in CountForAnyBitCondition()
672 A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart); in CountForAnyBitCondition()
673 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in CountForAnyBitCondition()
676 if (this->pData[nIndex].nEnd >= nEnd) in CountForAnyBitCondition()
678 ++nIndex; in CountForAnyBitCondition()
679 } while (nIndex < this->nCount); in CountForAnyBitCondition()
689 size_t nIndex = this->nCount-1; in GetLastAnyBitAccess() local
692 if ((this->pData[nIndex].aValue & rBitMask) != 0) in GetLastAnyBitAccess()
694 nEnd = this->pData[nIndex].nEnd; in GetLastAnyBitAccess()
699 if (nIndex > 0) in GetLastAnyBitAccess()
701 --nIndex; in GetLastAnyBitAccess()
702 if (this->pData[nIndex].nEnd < nStart) in GetLastAnyBitAccess()
803 nIndex = rArray.Search( nCurrent); in Follow()