Lines Matching refs:nEnd

42     pData[0].nEnd = nMaxAccess;  in ScCompressedArray()
61 pData[nCount].nEnd = j-1; in ScCompressedArray()
67 pData[nCount].nEnd = nMaxAccess; in ScCompressedArray()
103 long nEnd = 0; in Search() local
110 nStart = (long) pData[i - 1].nEnd; in Search()
113 nEnd = (long) pData[i].nEnd; in Search()
114 if (nEnd < (long) nAccess) in Search()
127 void ScCompressedArray<A,D>::SetValue( A nStart, A nEnd, const D& rValue ) in SetValue() argument
129 if (0 <= nStart && nStart <= nMaxAccess && 0 <= nEnd && nEnd <= nMaxAccess in SetValue()
130 && nStart <= nEnd) in SetValue()
132 if ((nStart == 0) && (nEnd == nMaxAccess)) in SetValue()
163 if (ni == 0 || (pData[ni-1].nEnd < nStart - 1)) in SetValue()
166 if (pData[ni].nEnd > nEnd) in SetValue()
171 else if (ni > 0 && pData[ni-1].nEnd == nStart - 1) in SetValue()
176 pData[ni-1].nEnd = nEnd; in SetValue()
188 while (nj < nCount && pData[nj].nEnd <= nEnd) in SetValue()
198 pData[ni-1].nEnd = pData[nj].nEnd; in SetValue()
202 pData[ni-1].nEnd = nStart - 1; // shrink in SetValue()
208 pData[ni-1].nEnd = nStart - 1; // shrink in SetValue()
214 pData[ni].nEnd = nEnd; in SetValue()
243 pData[nInsert-1].nEnd = nStart - 1; in SetValue()
244 pData[nInsert].nEnd = nEnd; in SetValue()
255 A nEnd, long nSourceDy ) in CopyFrom() argument
259 for (A j=nStart; j<=nEnd; ++j) in CopyFrom()
265 if (nRegionEnd > nEnd) in CopyFrom()
266 nRegionEnd = nEnd; in CopyFrom()
280 if (nIndex > 0 && pData[nIndex-1].nEnd+1 == nStart) in Insert()
285 pData[nIndex].nEnd += nAccessCount; in Insert()
286 if (pData[nIndex].nEnd >= nMaxAccess) in Insert()
288 pData[nIndex].nEnd = nMaxAccess; in Insert()
299 A nEnd = nStart + nAccessCount - 1; 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()
327 pData[nIndex].nEnd -= nAccessCount; in Remove()
329 pData[nCount-1].nEnd = nMaxAccess; in Remove()
336 A nEnd = ::std::numeric_limits<A>::max(); in GetLastUnequalAccess() local
342 nEnd = pData[nIndex].nEnd; in GetLastUnequalAccess()
350 if (pData[nIndex].nEnd < nStart) in GetLastUnequalAccess()
357 return nEnd; in GetLastUnequalAccess()
364 unsigned long ScSummableCompressedArray<A,D>::SumValues( A nStart, A nEnd ) const in SumValues()
367 unsigned long nSum = SumValuesContinuation( nStart, nEnd, nIndex); in SumValues()
368 if (nEnd > this->nMaxAccess) in SumValues()
369 nSum += this->pData[this->nCount-1].aValue * (nEnd - this->nMaxAccess); in SumValues()
376 A nStart, A nEnd, size_t& nIndex ) const in SumValuesContinuation() argument
380 while (nIndex < this->nCount && nS <= nEnd) in SumValuesContinuation()
382 A nE = ::std::min( this->pData[nIndex].nEnd, nEnd); in SumValuesContinuation()
389 if (nS <= nEnd) 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()
412 if (nS <= nEnd) in SumScaledValuesContinuation()
422 void ScBitMaskCompressedArray<A,D>::AndValue( A nStart, A nEnd, in AndValue() argument
425 if (nStart > nEnd) 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()
436 if (nE >= nEnd) in AndValue()
440 else if (this->pData[nIndex].nEnd >= nEnd) in AndValue()
449 void ScBitMaskCompressedArray<A,D>::OrValue( A nStart, A nEnd, in OrValue() argument
452 if (nStart > nEnd) 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()
463 if (nE >= nEnd) in OrValue()
467 else if (this->pData[nIndex].nEnd >= nEnd) in OrValue()
477 const ScBitMaskCompressedArray<A,D>& rArray, A nStart, A nEnd, in CopyFromAnded() argument
482 for (A j=nStart; j<=nEnd; ++j) in CopyFromAnded()
488 if (nRegionEnd > nEnd) in CopyFromAnded()
489 nRegionEnd = nEnd; in CopyFromAnded()
498 const ScBitMaskCompressedArray<A,D>& rArray, A nStart, A nEnd, in CopyFromOred() argument
503 for (A j=nStart; j<=nEnd; ++j) in CopyFromOred()
509 if (nRegionEnd > nEnd) in CopyFromOred()
510 nRegionEnd = nEnd; in CopyFromOred()
518 A ScBitMaskCompressedArray<A,D>::GetBitStateStart( A nEnd, in GetBitStateStart() argument
522 size_t nIndex = this->Search( nEnd); in GetBitStateStart()
528 nStart = this->pData[nIndex].nEnd + 1; in GetBitStateStart()
544 A nEnd = ::std::numeric_limits<A>::max(); in GetBitStateEnd() local
549 nEnd = this->pData[nIndex].nEnd; in GetBitStateEnd()
552 return nEnd; in GetBitStateEnd()
557 A ScBitMaskCompressedArray<A,D>::GetFirstForCondition( A nStart, A nEnd, in GetFirstForCondition() argument
565 A nFound = nIndex > 0 ? this->pData[nIndex-1].nEnd + 1 : 0; in GetFirstForCondition()
568 if (this->pData[nIndex].nEnd >= nEnd) in GetFirstForCondition()
577 A ScBitMaskCompressedArray<A,D>::GetLastForCondition( A nStart, A nEnd, in GetLastForCondition() argument
580 size_t nIndex = this->Search( nEnd); in GetLastForCondition()
584 return ::std::min( this->pData[nIndex].nEnd, nEnd); in GetLastForCondition()
589 if (this->pData[nIndex].nEnd < nStart) in GetLastForCondition()
600 A ScBitMaskCompressedArray<A,D>::CountForCondition( A nStart, A nEnd, in CountForCondition() argument
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()
622 size_t ScBitMaskCompressedArray<A,D>::FillArrayForCondition( A nStart, A nEnd, in FillArrayForCondition() argument
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()
646 bool ScBitMaskCompressedArray<A,D>::HasCondition( A nStart, A nEnd, in HasCondition() argument
654 if (this->pData[nIndex].nEnd >= nEnd) in HasCondition()
663 A ScBitMaskCompressedArray<A,D>::CountForAnyBitCondition( A nStart, A nEnd, in CountForAnyBitCondition() argument
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()
688 A nEnd = ::std::numeric_limits<A>::max(); in GetLastAnyBitAccess() local
694 nEnd = this->pData[nIndex].nEnd; in GetLastAnyBitAccess()
702 if (this->pData[nIndex].nEnd < nStart) in GetLastAnyBitAccess()
709 return nEnd; in GetLastAnyBitAccess()
716 A nStart, A nEnd, const D& rBitMask, const D& rMaskedCompare, in SumCoupledArrayForCondition() argument
728 rArray.GetDataEntry(nIndex2).nEnd < nS) in SumCoupledArrayForCondition()
731 ::std::min( this->pData[nIndex1].nEnd, nEnd), nIndex2); in SumCoupledArrayForCondition()
736 nS = this->pData[nIndex1].nEnd + 1; in SumCoupledArrayForCondition()
738 } while (nIndex1 < this->nCount && nS <= nEnd); in SumCoupledArrayForCondition()
739 if (nEnd > this->nMaxAccess && in SumCoupledArrayForCondition()
741 nSum += rArray.GetDataEntry(rArray.GetEntryCount()-1).aValue * (nEnd - in SumCoupledArrayForCondition()
750 A nStart, A nEnd, const D& rBitMask, const D& rMaskedCompare, in SumScaledCoupledArrayForCondition() argument
762 rArray.GetDataEntry(nIndex2).nEnd < nS) in SumScaledCoupledArrayForCondition()
765 ::std::min( this->pData[nIndex1].nEnd, nEnd), nIndex2, fScale); in SumScaledCoupledArrayForCondition()
770 nS = this->pData[nIndex1].nEnd + 1; in SumScaledCoupledArrayForCondition()
772 } while (nIndex1 < this->nCount && nS <= nEnd); in SumScaledCoupledArrayForCondition()
773 if (nEnd > this->nMaxAccess && in SumScaledCoupledArrayForCondition()
777 (nEnd - this->nMaxAccess); in SumScaledCoupledArrayForCondition()
811 const ScBitMaskCompressedArray<A,D> & rArray1, A nStart, A nEnd, in ScCoupledCompressedArrayIterator() argument
814 : aIter1( rArray1, nStart, nEnd ) in ScCoupledCompressedArrayIterator()
815 , aIter2( rArray2, nStart, nEnd ) in ScCoupledCompressedArrayIterator()
839 void ScCoupledCompressedArrayIterator<A,D,S>::NewLimits( A nStart, A nEnd ) in NewLimits() argument
841 aIter1.NewLimits( nStart, nEnd); in NewLimits()
842 aIter2.NewLimits( nStart, nEnd); in NewLimits()