コード例 #1
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 /// <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(AList{T}, bool)"/>
 public virtual void Prepend(AList <T> other, bool move)
 {
     Combine(other, move, false);
 }
コード例 #2
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 public void AddRange(AList <T> source)
 {
     InsertRange(Count, source);
 }
コード例 #3
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 /// <summary>Appends another AList to this list in sublinear time.</summary>
 /// <param name="other">A list of items to be added to this list.</param>
 /// <param name="move">If this parameter is true, items from the other list
 /// are transferred to this list, causing the other list to be cleared.
 /// This parameter does not affect the speed of this method itself, but
 /// if you use "true" then future modifications to the combined list may
 /// be faster. If this parameter is "false" then it will be necessary to
 /// freeze the contents of the other list so that both lists can share
 /// the same tree nodes. Using "true" instead avoids the freeze operation,
 /// which in turn avoids the performance penalty on future modifications.
 /// <remarks>
 /// The default value of the 'move' parameter is false.
 /// <para/>
 /// When the 'source' list is short, this method doesn't perform
 /// any better than a standard AddRange() operation (in fact, the operation
 /// is delegated to <see cref="InsertRange"/>()). However, when 'source'
 /// has several hundred or thousand items, the append/prepend operation is
 /// performed in roughly O(log N) time where N is the combined list size.
 /// <para/>
 /// Parts of the tree that end up shared between this list and the other
 /// list will be frozen. Frozen parts of the tree must be cloned in order
 /// to be modified, which will slow down future operations on the tree.
 /// In order to avoid this problem, use move semantics (which clears the
 /// other list).
 /// </remarks>
 public virtual void Append(AList <T> other, bool move)
 {
     Combine(other, move, true);
 }
コード例 #4
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 /// <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(AList{T}, bool)"/>
 public virtual void Prepend(AList <T> other)
 {
     Combine(other, false, false);
 }
コード例 #5
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 /// <inheritdoc cref="Append(AList{T}, bool)"/>
 public virtual void Append(AList <T> other)
 {
     Combine(other, false, true);
 }
コード例 #6
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 /// <summary>Swaps the contents of two <see cref="AList{T}"/>s in O(1) time.</summary>
 /// <remarks>Any observers are also swapped.</remarks>
 public void Swap(AList <T> other)
 {
     base.SwapHelper(other, true);
 }
コード例 #7
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 public void InsertRange(int index, AList <T> source, bool move)
 {
     base.InsertRange(index, source, move);
 }
コード例 #8
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 public void InsertRange(int index, AList <T> source)
 {
     InsertRange(index, source, false);
 }
コード例 #9
0
ファイル: AList.cs プロジェクト: bel-uwa/Loyc
 public AList(AList <T> items, bool keepListChangingHandlers) : base(items, keepListChangingHandlers)
 {
 }