예제 #1
0
            internal override void CopyTo(ParallelPostingsArray toArray, int numToCopy)
            {
                Debug.Assert(toArray is FreqProxPostingsArray);
                FreqProxPostingsArray to = (FreqProxPostingsArray)toArray;

                base.CopyTo(toArray, numToCopy);

                Array.Copy(lastDocIDs, 0, to.lastDocIDs, 0, numToCopy);
                Array.Copy(lastDocCodes, 0, to.lastDocCodes, 0, numToCopy);
                if (lastPositions != null)
                {
                    Debug.Assert(to.lastPositions != null);
                    Array.Copy(lastPositions, 0, to.lastPositions, 0, numToCopy);
                }
                if (lastOffsets != null)
                {
                    Debug.Assert(to.lastOffsets != null);
                    Array.Copy(lastOffsets, 0, to.lastOffsets, 0, numToCopy);
                }
                if (termFreqs != null)
                {
                    Debug.Assert(to.termFreqs != null);
                    Array.Copy(termFreqs, 0, to.termFreqs, 0, numToCopy);
                }
            }
예제 #2
0
        internal ParallelPostingsArray Grow()
        {
            int newSize = ArrayUtil.Oversize(size + 1, BytesPerPosting());
            ParallelPostingsArray newArray = NewInstance(newSize);

            CopyTo(newArray, size);
            return(newArray);
        }
예제 #3
0
            public override int[] Grow()
            {
                ParallelPostingsArray postingsArray = perField.postingsArray;
                int oldSize = perField.postingsArray.size;

                postingsArray = perField.postingsArray = postingsArray.Grow();
                bytesUsed.AddAndGet((postingsArray.BytesPerPosting() * (postingsArray.size - oldSize)));
                return(postingsArray.textStarts);
            }
예제 #4
0
            internal override void CopyTo(ParallelPostingsArray toArray, int numToCopy)
            {
                Debug.Assert(toArray is TermVectorsPostingsArray);
                TermVectorsPostingsArray to = (TermVectorsPostingsArray)toArray;

                base.CopyTo(toArray, numToCopy);

                Array.Copy(freqs, 0, to.freqs, 0, size);
                Array.Copy(lastOffsets, 0, to.lastOffsets, 0, size);
                Array.Copy(lastPositions, 0, to.lastPositions, 0, size);
            }
예제 #5
0
 internal virtual void CopyTo(ParallelPostingsArray toArray, int numToCopy)
 {
     Array.Copy(textStarts, 0, toArray.textStarts, 0, numToCopy);
     Array.Copy(intStarts, 0, toArray.intStarts, 0, numToCopy);
     Array.Copy(byteStarts, 0, toArray.byteStarts, 0, numToCopy);
 }