Search Results for

    Show / Hide Table of Contents

    Class EnumerableComparer

    An element-wise equality comparer for sequences of values.

    Inheritance
    object
    EnumerableComparer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Collections
    Assembly: Flame.dll
    Syntax
    public static class EnumerableComparer

    Fields

    | Edit this page View Source

    EmptyHash

    The hash code for an empty sequence.

    Declaration
    public const int EmptyHash = -2128831035
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    FoldIntoHashCode(int, int)

    Folds a hash code for an element into a hash code for a sequence.

    Declaration
    public static int FoldIntoHashCode(int hashCode, int elementHashCode)
    Parameters
    Type Name Description
    int hashCode

    A hash code for a sequence without the element.

    int elementHashCode

    A hash code for an element.

    Returns
    Type Description
    int

    A hash code for a sequence that includes the element.

    | Edit this page View Source

    FoldIntoHashCode<T>(int, T)

    Folds a hash code for an element into a hash code for a sequence.

    Declaration
    public static int FoldIntoHashCode<T>(int hashCode, T element)
    Parameters
    Type Name Description
    int hashCode

    A hash code for a sequence without the element.

    T element

    An element whose hash code is to be folded into the hash code for the sequence.

    Returns
    Type Description
    int

    A hash code for a sequence that includes the element.

    Type Parameters
    Name Description
    T
    | Edit this page View Source

    HashEnumerable<T>(IEnumerable<T>)

    Hashes a sequence of elements.

    Declaration
    public static int HashEnumerable<T>(IEnumerable<T> sequence)
    Parameters
    Type Name Description
    IEnumerable<T> sequence

    The sequence to hash.

    Returns
    Type Description
    int

    A hash code for the entire sequence.

    Type Parameters
    Name Description
    T

    The type of element in the sequence.

    | Edit this page View Source

    HashEnumerable<T>(IEnumerable<T>, IEqualityComparer<T>)

    Hashes a sequence of elements.

    Declaration
    public static int HashEnumerable<T>(IEnumerable<T> sequence, IEqualityComparer<T> elementComparer)
    Parameters
    Type Name Description
    IEnumerable<T> sequence

    The sequence to hash.

    IEqualityComparer<T> elementComparer

    An equality comparer for elements of the sequence.

    Returns
    Type Description
    int

    A hash code for the entire sequence.

    Type Parameters
    Name Description
    T

    The type of element in the sequence.

    | Edit this page View Source

    HashUnorderedSet<T>(IEnumerable<T>)

    Hashes an unordered set of elements.

    Declaration
    public static int HashUnorderedSet<T>(IEnumerable<T> sequence)
    Parameters
    Type Name Description
    IEnumerable<T> sequence

    The unordered set to hash.

    Returns
    Type Description
    int

    An ordering-independent hash code for the entire set.

    Type Parameters
    Name Description
    T

    The type of element in the set.

    | Edit this page View Source

    HashUnorderedSet<T>(IEnumerable<T>, IEqualityComparer<T>)

    Hashes an unordered set of elements.

    Declaration
    public static int HashUnorderedSet<T>(IEnumerable<T> sequence, IEqualityComparer<T> elementComparer)
    Parameters
    Type Name Description
    IEnumerable<T> sequence

    The unordered set to hash.

    IEqualityComparer<T> elementComparer

    An equality comparer for elements of the set.

    Returns
    Type Description
    int

    An ordering-independent hash code for the entire set.

    Type Parameters
    Name Description
    T

    The type of element in the set.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX