public new SparseAList <T> RemoveSection(int start, int count) { if ((uint)count > _count - (uint)start) { throw new ArgumentOutOfRangeException(count < 0 ? "count" : "start+count"); } var newList = new SparseAList <T>(this, CopySectionHelper(start, count)); // bug fix: we must RemoveRange after creating the new list, because // the section is expected to have the same height as the original tree // during the constructor of the new list. RemoveRange(start, count); return(newList); }
public SparseAList(SparseAList <T> items, bool keepListChangingHandlers) : base(items, keepListChangingHandlers) { }
/// <summary>Prepends an AList to this list in sublinear time.</summary> /// <param name="other">A list of items to be added to the front of this list (at index 0).</param> /// <inheritdoc cref="Append(SparseAList{T}, bool)"/> public virtual void Prepend(SparseAList <T> other, bool move) { Combine(other, move, false); }
/// <summary>Prepends an AList to this list in sublinear time.</summary> /// <param name="other">A list of items to be added to the front of this list (at index 0).</param> /// <inheritdoc cref="Append(SparseAList{T}, bool)"/> public virtual void Prepend(SparseAList <T> other) { Combine(other, false, false); }
/// <inheritdoc cref="AList{T}.Append(AList{T}, bool)"/> public virtual void Append(SparseAList <T> other, bool move) { Combine(other, move, true); }
/// <inheritdoc cref="AList{T}.Append(AList{T}, bool)"/> public virtual void Append(SparseAList <T> other) { Combine(other, false, true); }
/// <summary>Swaps the contents of two <see cref="SparseAList{T}"/>s in O(1) time.</summary> /// <remarks>Any observers are also swapped.</remarks> public void Swap(SparseAList <T> other) { base.SwapHelper(other, true); }
public void InsertRange(int index, SparseAList <T> source, bool move) { base.InsertRange(index, source, move); }
public void InsertRange(int index, SparseAList <T> source) { InsertRange(index, source, false); }