Fork me on GitHub
  • API

    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.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    CollectionUtil
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public static class CollectionUtil

    Methods

    | Improve this Doc View Source

    IntroSort<T>(IList<T>)

    Sorts the given random access System.Collections.Generic.IList<T> 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
    System.Collections.Generic.IList<T> list

    This System.Collections.Generic.IList<T>

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

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

    Sorts the given System.Collections.Generic.IList<T> using the System.Collections.Generic.IComparer<T>. 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
    System.Collections.Generic.IList<T> list

    This System.Collections.Generic.IList<T>

    System.Collections.Generic.IComparer<T> comp

    The System.Collections.Generic.IComparer<T> to use for the sort.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TimSort<T>(IList<T>)

    Sorts the given System.Collections.Generic.IList<T> 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
    System.Collections.Generic.IList<T> list

    This System.Collections.Generic.IList<T>

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

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

    Sorts the given System.Collections.Generic.IList<T> using the System.Collections.Generic.IComparer<T>. 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
    System.Collections.Generic.IList<T> list

    this System.Collections.Generic.IList<T>

    System.Collections.Generic.IComparer<T> comp

    The System.Collections.Generic.IComparer<T> to use for the sort.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.