Search Results for

    Show / Hide Table of Contents

    Interface IInputMutatingSort

    An algorithm sorting the given list, directly modifying the list given in input and using such list as "workspace", rather than generating a brand new list sorted.

    Namespace: MoreStructures.Lists.Sorting
    Assembly: MoreStructures.dll
    Syntax
    public interface IInputMutatingSort
    Remarks

    The fact that the algorithm mutates the input list doesn't necessarily means that the algorithm is in place.
    For example MergeSort is not an in-place algorithm, since it requires additional O(n) space to perform the sorting (more than the O(log(n)) additional space allowed by the definition of in-place algorithm).
    Still, MergeSort implements IInputMutatingSort, since it mutates the input into its sorted version, and doesn't produce a fully sorted copy of the list.

    Methods

    | Improve this Doc View Source

    Sort<T>(IList<T>)

    Sorts the provided , by mutating it.
    Uses the default comparer of instances of type T to compare items.

    Declaration
    void Sort<T>(IList<T> list)
        where T : IComparable<T>
    Parameters
    Type Name Description
    IList<T> list
    Type Parameters
    Name Description
    T

    The type of items of the list. Unlike in Sort<T>(IList<T>), it doesn't necessarily have to support , as an external is provided.

    Remarks

    Alternative to Sort<T>(IList<T>) when T doesn't support or when the sorting strategy to be used is not the default one.

    | Improve this Doc View Source

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

    Sorts the provided , by mutating it.
    Uses the provided comparer of instances of type T to compare items.

    Declaration
    void Sort<T>(IList<T> list, IComparer<T> comparer)
    Parameters
    Type Name Description
    IList<T> list

    The list to be sorted.

    IComparer<T> comparer

    The comparer of instances of T, to be used for comparisons (if necessary).

    Type Parameters
    Name Description
    T

    The type of items of the list. Unlike in Sort<T>(IList<T>), it doesn't necessarily have to support , as an external is provided.

    Remarks

    Alternative to Sort<T>(IList<T>) when T doesn't support or when the sorting strategy to be used is not the default one.

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX