[Home] Module Microsoft.FSharp.Collections.HashIdentity


Common notions of value identity used with hash tables.

Values

ValueDescription
val Reference<'key> : ReferenceHash<'key>
Physical hashing (hash on reference identity of objects, and the contents of value types). Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, i.e. for value types use GetHashCode and Object.Equals (if no other optimization available), and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and reference equality.
val Structural<'key> : StructuralHash<'key>
Generic hashing. Hash using LanguagePrimitives.GenericEquality and LanguagePrimitives.GenericComparer. i.e. for value types use GetHashCode and Object.Equals (if no other optimization available), and for reference types use the F# cooperative structural term hashing scheme. Object.GetHashCode(obj) is used if no other choice is available.

Deprecated Values

ValueDescription
[<Obsolete ("This function has been renamed to HashIdentity.FromFunction")>]
val Custom : ('key -> int) -> ('key -> 'key -> bool) -> IEqualityComparer<'key>

Note: This function has been renamed to HashIdentity.FromFunction

[<Obsolete ("This function has been renamed to 'FromFunctions'")>]
val FromFunction :
  ('key -> int) -> ('key -> 'key -> bool) -> IEqualityComparer<'key>

Note: This function has been renamed to 'FromFunctions'

[<Obsolete
  ("Consider creating an explicit implementation of IEqualityComparer using an object expression instead")>]
val FromFunctions :
  ('key -> int) -> ('key -> 'key -> bool) -> IEqualityComparer<'key>

Note: Consider creating an explicit implementation of IEqualityComparer using an object expression instead

Physical hashing (hash on reference identity of objects, and the contents of value types). Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, i.e. for value types use GetHashCode and Object.Equals (if no other optimization available), and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and reference equality.
[<Obsolete
  ("Consider creating an explicit implementation of IEqualityComparer using an object expression instead")>]
val Object<'key> : IEqualityComparer<'key>

Note: Consider creating an explicit implementation of IEqualityComparer using an object expression instead

Hash using Object.GetHashCode and Object.Equals(Object)
[<Obsolete
  ("Consider creating an explicit implementation of IEqualityComparer using an object expression instead")>]
val ViaGetHashCode<'key> : IEqualityComparer<'key>

Note: Consider creating an explicit implementation of IEqualityComparer using an object expression instead

Hash using Object.GetHashCode and Object.Equals(Object)

See Also

Microsoft.FSharp.Collections


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19