public void Sort(int index, int count, Comparison <T> comp) { Debug.Assert((uint)index <= (uint)_count); Debug.Assert((uint)count <= (uint)_count - (uint)index); if (!IsDivided) { InternalList.Sort(_array, _start + index, count, comp); } else if (index == 0 && count == Count) { Sort(comp); } else { // Use a slower IList<T> sort because the array sort requires contiguous input ListExt.Sort(AsDList(), index, count, comp); } }
public void Sort(int index, int count, Comparison <T> comp) { Debug.Assert(index + count <= _count); InternalList.Sort(_array, index, count, comp); }
public void Sort(Comparison <T> comp) { // Make the array contiguous so that we can use a fast array sort RearrangeToContiguous(); InternalList.Sort(_array, _start, _count, comp); }
//public Iterator<T> GetIterator(int start, int subcount) //{ // return _list.GetIterator(start, subcount); //} public void Sort(int start, int subcount, Comparison <T> comp) { Debug.Assert(!_isFrozen); _list.Sort(start, subcount, comp); }