Show / Hide Table of Contents

    Class EnumerableComparer

    An element-wise equality comparer for sequences of values.

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

    Fields

    | Improve this Doc View Source

    EmptyHash

    The hash code for an empty sequence.

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

    Methods

    | Improve this Doc View Source

    FoldIntoHashCode(Int32, Int32)

    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
    System.Int32 hashCode

    A hash code for a sequence without the element.

    System.Int32 elementHashCode

    A hash code for an element.

    Returns
    Type Description
    System.Int32

    A hash code for a sequence that includes the element.

    | Improve this Doc View Source

    FoldIntoHashCode<T>(Int32, 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
    System.Int32 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
    System.Int32

    A hash code for a sequence that includes the element.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    HashEnumerable<T>(IEnumerable<T>)

    Hashes a sequence of elements.

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

    The sequence to hash.

    Returns
    Type Description
    System.Int32

    A hash code for the entire sequence.

    Type Parameters
    Name Description
    T

    The type of element in the sequence.

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<T> sequence

    The sequence to hash.

    System.Collections.Generic.IEqualityComparer<T> elementComparer

    An equality comparer for elements of the sequence.

    Returns
    Type Description
    System.Int32

    A hash code for the entire sequence.

    Type Parameters
    Name Description
    T

    The type of element in the sequence.

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<T> sequence

    The unordered set to hash.

    Returns
    Type Description
    System.Int32

    An ordering-independent hash code for the entire set.

    Type Parameters
    Name Description
    T

    The type of element in the set.

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<T> sequence

    The unordered set to hash.

    System.Collections.Generic.IEqualityComparer<T> elementComparer

    An equality comparer for elements of the set.

    Returns
    Type Description
    System.Int32

    An ordering-independent hash code for the entire set.

    Type Parameters
    Name Description
    T

    The type of element in the set.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX