public SparseAListLeaf(SparseAListLeaf <T> original) { _list = original._list.Clone(); _maxNodeSize = original._maxNodeSize; _totalCount = original._totalCount; _isFrozen = false; }
static void AdjustOffsetsStartingAt(int i, ref InternalDList <Entry> list, int change) { for (; i < list.Count; i++) { list.InternalArray[list.Internalize(i)].Offset += (uint)change; } }
private SparseAListLeaf(ushort maxNodeSize, InternalDList <Entry> list, uint totalCount) { Debug.Assert(maxNodeSize >= 3); _maxNodeSize = maxNodeSize; _list = list; _totalCount = totalCount; }
public InternalDList <T> Clone() { InternalDList <T> clone = new InternalDList <T>(); clone._array = new T[Count]; CopyTo(clone._array, 0); clone._start = 0; clone._count = Count; return(clone); }
public override AListNode <int, T> CopySection(uint index, uint count, AListBase <int, T> list) { int i1, i2; i1 = GetSectionRange(index, count, out i2); InternalDList <Entry> section = _list.CopySection(i1, i2 - i1); AdjustOffsetsStartingAt(0, ref section, -(int)index); return(new SparseAListLeaf <T>(_maxNodeSize, section, count)); }
internal Enumerator(InternalDList <T> list, DList <T> wrapper) { size1 = list.FirstHalfSize; i = list._start; stop = i + size1; stop2 = list._count - size1; array = list._array; wrapper = wrapper ?? NoWrapper; this.wrapper = wrapper; oldCount = wrapper.Count; }
internal static void RemovingItems <K, T>(this IAListTreeObserver <K, T> self, InternalDList <T> list, int index, int count, AListLeaf <K, T> parent, bool isMoving) { for (int i = index; i < index + count; i++) { self.ItemRemoved(list[i], parent); } }
protected BListLeaf(ushort maxNodeSize, InternalDList <T> list) : base(maxNodeSize, list) { }
public AListLeaf(AListLeaf <K, T> original) { _list = original._list.Clone(); _maxNodeSize = original._maxNodeSize; _isFrozen = false; }
protected AListLeaf(ushort maxNodeSize, InternalDList <T> list) : this(maxNodeSize) { _list = list; }