Header menu logo FSharp.Data.Adaptive

HashMap Module

Functions and values

Function or value Description

HashMap.add k v m

Full Usage: HashMap.add k v m

Parameters:
    k : 'K
    v : 'V
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Adds or updates the entry for the given key. `O(1)`

k : 'K
v : 'V
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.alter k update m

Full Usage: HashMap.alter k update m

Parameters:
    k : 'K
    update : 'V option -> 'V option
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Adds, deletes or updates the entry for the given key. The update functions gets the optional old value and may optionally return A new value (or None for deleting the entry). `O(1)`

k : 'K
update : 'V option -> 'V option
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.alterV k update m

Full Usage: HashMap.alterV k update m

Parameters:
    k : 'K
    update : 'V voption -> 'V voption
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Adds, deletes or updates the entry for the given key. The update functions gets the optional old value and may optionally return A new value (or None for deleting the entry). `O(1)`

k : 'K
update : 'V voption -> 'V voption
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.choose mapping m

Full Usage: HashMap.choose mapping m

Parameters:
    mapping : 'K -> 'V -> 'a option
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'a>
Modifiers: inline
Type parameters: 'K, 'V, 'a

Creates a new map (with the same keys) by applying the given function to all entries. `O(N)`

mapping : 'K -> 'V -> 'a option
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'a>

HashMap.choose2 mapping l r

Full Usage: HashMap.choose2 mapping l r

Parameters:
    mapping : 'K -> 'T1 option -> 'T2 option -> 'R option
    l : HashMap<'K, 'T1>
    r : HashMap<'K, 'T2>

Returns: HashMap<'K, 'R>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2, 'R

Applies the given mapping function to all elements of the two maps. `O(N + M)`

mapping : 'K -> 'T1 option -> 'T2 option -> 'R option
l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, 'R>

HashMap.choose2V mapping l r

Full Usage: HashMap.choose2V mapping l r

Parameters:
    mapping : 'K -> 'T1 voption -> 'T2 voption -> 'R voption
    l : HashMap<'K, 'T1>
    r : HashMap<'K, 'T2>

Returns: HashMap<'K, 'R>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2, 'R

Applies the given mapping function to all elements of the two maps. `O(N + M)`

mapping : 'K -> 'T1 voption -> 'T2 voption -> 'R voption
l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, 'R>

HashMap.chooseV mapping m

Full Usage: HashMap.chooseV mapping m

Parameters:
    mapping : 'K -> 'V -> 'a voption
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'a>
Modifiers: inline
Type parameters: 'K, 'V, 'a

Creates a new map (with the same keys) by applying the given function to all entries. `O(N)`

mapping : 'K -> 'V -> 'a voption
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'a>

HashMap.containsKey k m

Full Usage: HashMap.containsKey k m

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'K, 'V

Tests if an entry for the given key exists. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: bool

HashMap.count map

Full Usage: HashMap.count map

Parameters:
Returns: int
Modifiers: inline
Type parameters: 'K, 'V

The number of elements in the map `O(1)`

map : HashMap<'K, 'V>
Returns: int

HashMap.empty

Full Usage: HashMap.empty

Returns: HashMap<'K, 'V>

the empty map.

Returns: HashMap<'K, 'V>

HashMap.equals map1 map2

Full Usage: HashMap.equals map1 map2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'K, 'V

Are the two maps equal? `O(min(N, M))`

map1 : HashMap<'K, 'V>
map2 : HashMap<'K, 'V>
Returns: bool

HashMap.exists predicate m

Full Usage: HashMap.exists predicate m

Parameters:
    predicate : 'K -> 'V -> bool
    m : HashMap<'K, 'V>

Returns: bool
Modifiers: inline
Type parameters: 'K, 'V

Tests whether an entry making the predicate true exists. `O(N)`

predicate : 'K -> 'V -> bool
m : HashMap<'K, 'V>
Returns: bool

HashMap.filter predicate m

Full Usage: HashMap.filter predicate m

Parameters:
    predicate : 'K -> 'V -> bool
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a new map (with the same keys) that contains all entries for which predicate was true. `O(N)`

predicate : 'K -> 'V -> bool
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.find k m

Full Usage: HashMap.find k m

Parameters:
Returns: 'V
Modifiers: inline
Type parameters: 'K, 'V

Finds the value for the given key and raises KeyNotFoundException on failure. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: 'V

HashMap.fold folder state m

Full Usage: HashMap.fold folder state m

Parameters:
    folder : 'S -> 'K -> 'V -> 'S
    state : 'S
    m : HashMap<'K, 'V>

Returns: 'S
Modifiers: inline
Type parameters: 'S, 'K, 'V

Folds over all entries of the map. Note that the order for elements is undefined. `O(N)`

folder : 'S -> 'K -> 'V -> 'S
state : 'S
m : HashMap<'K, 'V>
Returns: 'S

HashMap.forall predicate m

Full Usage: HashMap.forall predicate m

Parameters:
    predicate : 'K -> 'V -> bool
    m : HashMap<'K, 'V>

Returns: bool
Modifiers: inline
Type parameters: 'K, 'V

Tests whether all entries fulfil the given predicate. `O(N)`

predicate : 'K -> 'V -> bool
m : HashMap<'K, 'V>
Returns: bool

HashMap.intersect l r

Full Usage: HashMap.intersect l r

Parameters:
Returns: HashMap<'K, ('T1 * 'T2)>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2

returns only the keys that are in both maps together with their tuples values. `O(N + M)`

l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, ('T1 * 'T2)>

HashMap.intersectWith mapping l r

Full Usage: HashMap.intersectWith mapping l r

Parameters:
    mapping : 'K -> 'T1 -> 'T2 -> 'R
    l : HashMap<'K, 'T1>
    r : HashMap<'K, 'T2>

Returns: HashMap<'K, 'R>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2, 'R

Applies the given mapping function to overlapping elements of the two maps. `O(N + M)`

mapping : 'K -> 'T1 -> 'T2 -> 'R
l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, 'R>

HashMap.intersectionCount map1 map2

Full Usage: HashMap.intersectionCount map1 map2

Parameters:
Returns: int
Modifiers: inline
Type parameters: 'K, 'T1, 'T2

Returns the number of elements that are in both sets.

map1 : HashMap<'K, 'T1>
map2 : HashMap<'K, 'T2>
Returns: int

HashMap.isEmpty map

Full Usage: HashMap.isEmpty map

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'K, 'V

Is the map empty? `O(1)`

map : HashMap<'K, 'V>
Returns: bool

HashMap.iter action m

Full Usage: HashMap.iter action m

Parameters:
    action : 'K -> 'V -> unit
    m : HashMap<'K, 'V>

Modifiers: inline
Type parameters: 'K, 'V

Applies the iter function to all entries of the map. `O(N)`

action : 'K -> 'V -> unit
m : HashMap<'K, 'V>

HashMap.keys m

Full Usage: HashMap.keys m

Parameters:
Returns: HashSet<'K>
Modifiers: inline
Type parameters: 'K, 'V

Creates a HashSet holding all keys contained in the map. `O(1)`

m : HashMap<'K, 'V>
Returns: HashSet<'K>

HashMap.map mapping m

Full Usage: HashMap.map mapping m

Parameters:
    mapping : 'K -> 'V -> 'a
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'a>
Modifiers: inline
Type parameters: 'K, 'V, 'a

Creates a new map (with the same keys) by applying the given function to all entries. `O(N)`

mapping : 'K -> 'V -> 'a
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'a>

HashMap.map2 mapping l r

Full Usage: HashMap.map2 mapping l r

Parameters:
    mapping : 'K -> 'T1 option -> 'T2 option -> 'R
    l : HashMap<'K, 'T1>
    r : HashMap<'K, 'T2>

Returns: HashMap<'K, 'R>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2, 'R

Applies the given mapping function to all elements of the two maps. `O(N + M)`

mapping : 'K -> 'T1 option -> 'T2 option -> 'R
l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, 'R>

HashMap.map2V mapping l r

Full Usage: HashMap.map2V mapping l r

Parameters:
    mapping : 'K -> 'T1 voption -> 'T2 voption -> 'R
    l : HashMap<'K, 'T1>
    r : HashMap<'K, 'T2>

Returns: HashMap<'K, 'R>
Modifiers: inline
Type parameters: 'K, 'T1, 'T2, 'R

Applies the given mapping function to all elements of the two maps. `O(N + M)`

mapping : 'K -> 'T1 voption -> 'T2 voption -> 'R
l : HashMap<'K, 'T1>
r : HashMap<'K, 'T2>
Returns: HashMap<'K, 'R>

HashMap.ofArray elements

Full Usage: HashMap.ofArray elements

Parameters:
    elements : ('K * 'V)[]

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the array. `O(N)`

elements : ('K * 'V)[]
Returns: HashMap<'K, 'V>

HashMap.ofArrayV elements

Full Usage: HashMap.ofArrayV elements

Parameters:
    elements : ('K * 'V)[]

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the array. `O(N)`

elements : ('K * 'V)[]
Returns: HashMap<'K, 'V>

HashMap.ofList elements

Full Usage: HashMap.ofList elements

Parameters:
    elements : ('K * 'V) list

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the list. `O(N)`

elements : ('K * 'V) list
Returns: HashMap<'K, 'V>

HashMap.ofListV elements

Full Usage: HashMap.ofListV elements

Parameters:
    elements : ('K * 'V) list

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the list. `O(N)`

elements : ('K * 'V) list
Returns: HashMap<'K, 'V>

HashMap.ofMap elements

Full Usage: HashMap.ofMap elements

Parameters:
    elements : Map<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the map. `O(N)`

elements : Map<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.ofSeq elements

Full Usage: HashMap.ofSeq elements

Parameters:
    elements : ('K * 'V) seq

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the seq. `O(N)`

elements : ('K * 'V) seq
Returns: HashMap<'K, 'V>

HashMap.ofSeqV elements

Full Usage: HashMap.ofSeqV elements

Parameters:
    elements : ('K * 'V) seq

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with all entries from the seq. `O(N)`

elements : ('K * 'V) seq
Returns: HashMap<'K, 'V>

HashMap.remove k m

Full Usage: HashMap.remove k m

Parameters:
Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Removes the entry for the given key. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.single key value

Full Usage: HashMap.single key value

Parameters:
    key : 'K
    value : 'V

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a map with a single entry. `O(1)`

key : 'K
value : 'V
Returns: HashMap<'K, 'V>

HashMap.toArray m

Full Usage: HashMap.toArray m

Parameters:
Returns: ('K * 'V)[]
Modifiers: inline
Type parameters: 'K, 'V

Creates an array holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V)[]

HashMap.toArrayV m

Full Usage: HashMap.toArrayV m

Parameters:
Returns: ('K * 'V)[]
Modifiers: inline
Type parameters: 'K, 'V

Creates an array holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V)[]

HashMap.toKeyArray m

Full Usage: HashMap.toKeyArray m

Parameters:
Returns: 'K[]
Modifiers: inline
Type parameters: 'K, 'V

Creates an array holding all keys contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'K[]

HashMap.toKeyList m

Full Usage: HashMap.toKeyList m

Parameters:
Returns: 'K list
Modifiers: inline
Type parameters: 'K, 'V

Creates a list holding all keys contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'K list

HashMap.toKeySeq m

Full Usage: HashMap.toKeySeq m

Parameters:
Returns: 'K seq
Modifiers: inline
Type parameters: 'K, 'V

Creates a seq holding all keys contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'K seq

HashMap.toList m

Full Usage: HashMap.toList m

Parameters:
Returns: ('K * 'V) list
Modifiers: inline
Type parameters: 'K, 'V

Creates a list holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V) list

HashMap.toListV m

Full Usage: HashMap.toListV m

Parameters:
Returns: ('K * 'V) list
Modifiers: inline
Type parameters: 'K, 'V

Creates a list holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V) list

HashMap.toMap m

Full Usage: HashMap.toMap m

Parameters:
Returns: Map<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a Map holding all tuples contained in the map. `O(N * log N)`

m : HashMap<'K, 'V>
Returns: Map<'K, 'V>

HashMap.toSeq m

Full Usage: HashMap.toSeq m

Parameters:
Returns: ('K * 'V) seq
Modifiers: inline
Type parameters: 'K, 'V

Creates a seq holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V) seq

HashMap.toSeqV m

Full Usage: HashMap.toSeqV m

Parameters:
Returns: ('K * 'V) seq
Modifiers: inline
Type parameters: 'K, 'V

Creates a seq holding all tuples contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: ('K * 'V) seq

HashMap.toValueArray m

Full Usage: HashMap.toValueArray m

Parameters:
Returns: 'V[]
Modifiers: inline
Type parameters: 'K, 'V

Creates an array holding all values contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'V[]

HashMap.toValueList m

Full Usage: HashMap.toValueList m

Parameters:
Returns: 'V list
Modifiers: inline
Type parameters: 'K, 'V

Creates a list holding all values contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'V list

HashMap.toValueSeq m

Full Usage: HashMap.toValueSeq m

Parameters:
Returns: 'V seq
Modifiers: inline
Type parameters: 'K, 'V

Creates a seq holding all values contained in the map. `O(N)`

m : HashMap<'K, 'V>
Returns: 'V seq

HashMap.tryFind k m

Full Usage: HashMap.tryFind k m

Parameters:
Returns: 'V option
Modifiers: inline
Type parameters: 'K, 'V

Tries to find the value for the given key. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: 'V option

HashMap.tryFindV k m

Full Usage: HashMap.tryFindV k m

Parameters:
Returns: 'V voption
Modifiers: inline
Type parameters: 'K, 'V

Tries to find the value for the given key. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: 'V voption

HashMap.tryRemove k m

Full Usage: HashMap.tryRemove k m

Parameters:
Returns: ('V * HashMap<'K, 'V>) option
Modifiers: inline
Type parameters: 'K, 'V

Tries to remove the entry for the given key from the map and returns its value and the rest of the map. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: ('V * HashMap<'K, 'V>) option

HashMap.tryRemoveV k m

Full Usage: HashMap.tryRemoveV k m

Parameters:
Returns: ('V * HashMap<'K, 'V>) voption
Modifiers: inline
Type parameters: 'K, 'V

Tries to remove the entry for the given key from the map and returns its value and the rest of the map. `O(1)`

k : 'K
m : HashMap<'K, 'V>
Returns: ('V * HashMap<'K, 'V>) voption

HashMap.union map1 map2

Full Usage: HashMap.union map1 map2

Parameters:
Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a new map containing all elements from l and r. Colliding entries are taken from r. `O(N + M)`

map1 : HashMap<'K, 'V>
map2 : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.unionMany maps

Full Usage: HashMap.unionMany maps

Parameters:
    maps : 'a

Returns: HashMap<'K, 'V>

Creates a new map by unioning all the given maps.

maps : 'a
Returns: HashMap<'K, 'V>

HashMap.unionWith resolve map1 map2

Full Usage: HashMap.unionWith resolve map1 map2

Parameters:
    resolve : 'K -> 'V -> 'V -> 'V
    map1 : HashMap<'K, 'V>
    map2 : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Creates a new map containing all elements from l and r. Colliding entries are resolved using the given function. `O(N + M)`

resolve : 'K -> 'V -> 'V -> 'V
map1 : HashMap<'K, 'V>
map2 : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.update k update m

Full Usage: HashMap.update k update m

Parameters:
    k : 'K
    update : 'V option -> 'V
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Adds or updates the entry for the given key. The update functions gets the optional old value and returns a new value for the key. `O(1)`

k : 'K
update : 'V option -> 'V
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

HashMap.updateV k update m

Full Usage: HashMap.updateV k update m

Parameters:
    k : 'K
    update : 'V voption -> 'V
    m : HashMap<'K, 'V>

Returns: HashMap<'K, 'V>
Modifiers: inline
Type parameters: 'K, 'V

Adds or updates the entry for the given key. The update functions gets the optional old value and returns a new value for the key. `O(1)`

k : 'K
update : 'V voption -> 'V
m : HashMap<'K, 'V>
Returns: HashMap<'K, 'V>

Type something to start searching.