コード例 #1
0
        private int GetSeriesOffset <TValue>(int index)
        {
            int offset;

            if (typeof(TValue) == typeof(DataBlock))
            {
                // in series _head is only used for MovingWindow
                // and is only applied to DataSource.
                offset = RingVecUtil.IndexToOffset(index, _head, _rowCount);
            }
            else
            {
                if (AdditionalCorrectnessChecks.Enabled)
                {
                    ThrowHelper.Assert(_head == 0, "_head == 0 for Series leaves");
                }
                offset = index;
            }

            return(offset);
        }
コード例 #2
0
ファイル: RingVec.cs プロジェクト: edwintorres/Spreads
 public T GetItem(int index)
 {
     return(_vec.GetRef <T>(RingVecUtil.IndexToOffset(index, _head, _count)));
 }
コード例 #3
0
ファイル: RingVec.cs プロジェクト: edwintorres/Spreads
 public T DangerousGetItem(int index)
 {
     return(_vec.DangerousGetUnaligned <T>(RingVecUtil.IndexToOffset(index, _head, _count)));
 }