Show / Hide Table of Contents

    Class CollectionUtil

    Methods for manipulating (sorting) collections. Sort methods work directly on the supplied lists and don't copy to/from arrays before/after. For medium size collections as used in the Lucene indexer that is much more efficient.

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    CollectionUtil
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class CollectionUtil : object

    Methods

    | Improve this Doc View Source

    IntroSort<T>(IList<T>)

    Sorts the given random access in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small lists.

    Declaration
    public static void IntroSort<T>(IList<T> list)
    Parameters
    Type Name Description
    IList<T> list

    This

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    IntroSort<T>(IList<T>, IComparer<T>)

    Sorts the given using the . This method uses the intro sort algorithm, but falls back to insertion sort for small lists.

    Declaration
    public static void IntroSort<T>(IList<T> list, IComparer<T> comp)
    Parameters
    Type Name Description
    IList<T> list

    This

    IComparer<T> comp

    The to use for the sort.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TimSort<T>(IList<T>)

    Sorts the given in natural order. This method uses the Tim sort algorithm, but falls back to binary sort for small lists.

    Declaration
    public static void TimSort<T>(IList<T> list)
    Parameters
    Type Name Description
    IList<T> list

    This

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TimSort<T>(IList<T>, IComparer<T>)

    Sorts the given using the . This method uses the Tim sort algorithm, but falls back to binary sort for small lists.

    Declaration
    public static void TimSort<T>(IList<T> list, IComparer<T> comp)
    Parameters
    Type Name Description
    IList<T> list

    this

    IComparer<T> comp

    The to use for the sort.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)