internal override int BinarySearch(TreeSpan span, T item, IComparer <T> comparer)
                {
                    Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");
                    Debug.Assert(comparer != null, $"Assertion failed: {nameof(comparer)} != null");

                    return(~0);
                }
                internal override int FindLastIndex(TreeSpan span, Predicate <T> match)
                {
                    Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");
                    Debug.Assert(match != null, $"Assertion failed: {nameof(match)} != null");

                    return(-1);
                }
                internal override Node Sort(TreeSpan span, IComparer <T> comparer)
                {
                    Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");
                    Debug.Assert(comparer != null, $"Assertion failed: {nameof(comparer)} != null");

                    return(this);
                }
Exemple #4
0
            internal override int FindLastIndex(TreeSpan span, Predicate <T> match)
            {
                Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");
                Debug.Assert(match != null, $"Assertion failed: {nameof(match)} != null");

                return(_data.FindLastIndex(span.EndInclusive, span.Count, match));
            }
Exemple #5
0
            internal override Node Sort(TreeSpan span, IComparer <T> comparer)
            {
                Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");
                Debug.Assert(comparer != null, $"Assertion failed: {nameof(comparer)} != null");

                LeafNode mutableNode = AsMutable();

                mutableNode._data.Sort(span.Start, span.Count, comparer);
                return(mutableNode);
            }
Exemple #6
0
            internal override int LastIndexOf(T item, TreeSpan span, IEqualityComparer <T> equalityComparer)
            {
                Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");

                return(_data.LastIndexOf(item, span.EndInclusive, span.Count, equalityComparer));
            }
                internal override int IndexOf(T item, TreeSpan span, IEqualityComparer <T> equalityComparer)
                {
                    Debug.Assert(span.IsSubspanOf(Span), $"Assertion failed: {nameof(span)}.IsSubspanOf({nameof(Span)})");

                    return(-1);
                }