[Home] Type Microsoft.FSharp.Collections.CHashTable


Configurable hash tables, i.e. with user-defined equality and hash. This is precisely the same type as that manipulated by the functions returned by invoking [[Microsoft.FSharp.MLLib.Hashtbl.Make]].

Full Type Signature

type CHashTable <'a,'b>
  with
    member TryFind : 'a -> 'b option
    member Replace : 'a * 'b -> unit
    member Remove : 'a -> unit
    member Map : ('a -> 'b -> 'c) -> CHashTable <'a,'c>
    member Iterate : ('a -> 'b -> unit) -> unit
    member GetLongestChain : unit -> ('a * 'b) list
    member Fold : ('a -> 'b -> 'c -> 'c) -> 'c -> 'c
    member FindAll : 'a -> 'b list
    member Find : 'a -> 'b
    static member Create : hash_ops<'a> * HashStats * int -> CHashTable <'a,'b>
    static member Create : hash_ops<'a> * int -> CHashTable <'a,'b>
    member Copy : unit -> CHashTable <'a,'b>
    member Contains : 'a -> bool
    member Clear : unit -> unit
    member Add : 'a * 'b -> unit
  end

Instance Members

MemberDescription
member Add : 'a * 'b -> unit
Add an element to the collection
member Clear : unit -> unit
Clear all elements from the collection
member Contains : 'a -> bool
Test if the collection contains any bindings for the given element
member Copy : unit -> CHashTable <'a,'b>
Make a shallow copy of the collection
member Find : 'a -> 'b
Lookup the given element in the table. Raise Not_found/IndexOutOfRangeException if the element is not found.
member FindAll : 'a -> 'b list
Find all bindings for the given element in the table, if any
member Fold : ('a -> 'b -> '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 GetLongestChain : unit -> ('a * 'b) list
Get the longest chain in the hash table as a list. Use for debugging
member Iterate : ('a -> 'b -> unit) -> unit
Apply the given function to each binding in the hash table
member Map : ('a -> 'b -> 'c) -> CHashTable <'a,'c>
Build a new table by applying the given function to each of the bindings in the table
member Remove : 'a -> unit
Remove the latest binding (if any) for the given element from the table
member Replace : 'a * 'b -> unit
Replace the latest binding (if any) for the given element.
member TryFind : 'a -> 'b option
Lookup the given element in the table, returning the result as an Option

Static Members

MemberDescription
member Create : hash_ops<'a> * HashStats * int -> CHashTable <'a,'b>
member Create : hash_ops<'a> * int -> CHashTable <'a,'b>

See Also

Microsoft.FSharp.Collections


Documentation for assembly fslib, version 1.1.10.1, generated using F# version 1.1.10.1