[Home] Type Microsoft.FSharp.Collections.HashMultiMap


Hash tables, by default based on F# structural "hash" and (=) functions. This is precisely the same type as that manipulated by the functions in [[Microsoft.FSharp.Compatibility.OCaml.Hashtbl]]. The table may map a single key to multiple bindings.

Full Type Signature

type HashMultiMap<'key,'a>
  with
    interface IEnumerable
    interface IEnumerable>
    interface ICollection>
    interface IDictionary<'key,'a>
    member Add : 'key * 'a -> unit
    member Clear : unit -> unit
    member Contains : 'key -> bool
    member Copy : unit -> HashMultiMap<'key,'a>
    [<OverloadIDAttribute ("Create_seq")>]
    static member Create : seq<'key * 'a> -> HashMultiMap<'key,'a>
    [<Obsolete ("HashStats are deprecated. The HashStats argument will be ignored")>]
    static member Create : IEqualityComparer<'key> * HashStats * int -> HashMultiMap<'key,'a>
    static member Create : IEqualityComparer<'key> * int -> HashMultiMap<'key,'a>
    static member Create : int -> HashMultiMap<'key,'a>
    static member Create : unit -> HashMultiMap<'key,'a>
    [<Obsolete ("Consider using hashTable.[key] instead")>]
    member Find : 'key -> 'a
    member FindAll : 'key -> 'a list
    member Fold : ('key -> 'a -> 'c -> 'c) -> ('c -> 'c)
    [<Obsolete ("GetLongestChain are deprecated. It will return the empty list")>]
    member GetLongestChain : unit -> ('key * 'a) list
    member Iterate : ('key -> 'a -> unit) -> unit
    member Remove : 'key -> unit
    member Replace : 'key * 'a -> unit
    member TryFind : 'key -> 'a option
    member Count : int
    member Item : 'key -> 'a with get
    member Item : 'key -> 'a with set
  end

Instance Members

MemberDescription
member Add : 'key * 'a -> unit
Add a binding for the element to the table
member Clear : unit -> unit
Clear all elements from the collection
member Contains : 'key -> bool
Test if the collection contains any bindings for the given element
member Copy : unit -> HashMultiMap<'key,'a>
Make a shallow copy of the collection
member Count : int
The total number of elements in the hash table
member FindAll : 'key -> 'a list
Find all bindings for the given element in the table, if any
member Fold : ('key -> 'a -> 'c -> 'c) -> ('c -> 'c)
Apply the given function to each element in the collection threading the accumulating parameter through the sequence of function applications
member Item : 'key -> 'a with get
Lookup or set the given element in the table. Raise [[Not_found]]/[[KeyNotFoundException]] if the element is not found.
member Item : 'key -> 'a with set
Lookup or set the given element in the table. Raise [[Not_found]]/[[KeyNotFoundException]] if the element is not found.
member Iterate : ('key -> 'a -> unit) -> unit
Apply the given function to each binding in the hash table
member Remove : 'key -> unit
Remove the latest binding (if any) for the given element from the table
member Replace : 'key * 'a -> unit
Replace the latest binding (if any) for the given element.
member TryFind : 'key -> 'a option
Lookup the given element in the table, returning the result as an Option

Static Members

MemberDescription
[<OverloadIDAttribute ("Create_seq")>]
member Create : seq<'key * 'a> -> HashMultiMap<'key,'a>
Build a map that contains the bindings of the given IEnumerable
member Create : IEqualityComparer<'key> * int -> HashMultiMap<'key,'a>
Create a new empty mutable hash table with an internal bucket array of the given approximate size and with the given key hash/equality functions
member Create : int -> HashMultiMap<'key,'a>
Create a new empty mutable hash table with an internal bucket array of the given approximate size and with key hash/equality based on the F# structural "hash" and (=) functions This function is always inlined to give compilers the opportunity to optimize the structural hash/equality functions based on any available compile-time knowledge of the key type at the call site.
member Create : unit -> HashMultiMap<'key,'a>
Create a new empty mutable hash table with key hash/equality based on the F# structural "hash" and (=) functions. This function is always inlined to give compilers the opportunity to optimize the structural hash/equality functions based on any available compile-time knowledge of the key type at the call site.

Deprecated Members

MemberDescription
[<Obsolete ("HashStats are deprecated. The HashStats argument will be ignored")>]
member
  Create : IEqualityComparer<'key> * HashStats * int -> HashMultiMap<'key,'a>

Note: HashStats are deprecated. The HashStats argument will be ignored

Create a new empty mutable hash table with an internal bucket array of the given approximate size and with the given key hash/equality functions and the given HashStats collector
[<Obsolete ("Consider using hashTable.[key] instead")>]
member Find : 'key -> 'a

Note: Consider using hashTable.[key] instead

[<Obsolete ("GetLongestChain are deprecated. It will return the empty list")>]
member GetLongestChain : unit -> ('key * 'a) list

Note: GetLongestChain are deprecated. It will return the empty list

Get the longest chain in the hash table as a list. Use for debugging

See Also

Microsoft.FSharp.Collections


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