Header menu logo FSharp.Data.Adaptive

HashSet Module

Functions and values

Function or value Description

HashSet.add value set

Full Usage: HashSet.add value set

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Adds the given value. `O(1)`

value : 'T
set : HashSet<'T>
Returns: HashSet<'T>

HashSet.alter value update m

Full Usage: HashSet.alter value update m

Parameters:
    value : 'T
    update : bool -> bool
    m : HashSet<'T>

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T
value : 'T
update : bool -> bool
m : HashSet<'T>
Returns: HashSet<'T>

HashSet.choose mapping set

Full Usage: HashSet.choose mapping set

Parameters:
    mapping : 'T -> 'U option
    set : HashSet<'T>

Returns: HashSet<'U>
Modifiers: inline
Type parameters: 'T, 'U

Creates a new set by applying the given function to all entries. `O(N)`

mapping : 'T -> 'U option
set : HashSet<'T>
Returns: HashSet<'U>

HashSet.chooseV mapping set

Full Usage: HashSet.chooseV mapping set

Parameters:
    mapping : 'T -> 'U voption
    set : HashSet<'T>

Returns: HashSet<'U>
Modifiers: inline
Type parameters: 'T, 'U

Creates a new set by applying the given function to all entries. `O(N)`

mapping : 'T -> 'U voption
set : HashSet<'T>
Returns: HashSet<'U>

HashSet.collect mapping set

Full Usage: HashSet.collect mapping set

Parameters:
Returns: HashSet<'U>

Creates a new set by applying the given function to all entries and unions the results.

mapping : 'T -> HashSet<'U>
set : HashSet<'T>
Returns: HashSet<'U>

HashSet.contains value set

Full Usage: HashSet.contains value set

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

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

value : 'T
set : HashSet<'T>
Returns: bool

HashSet.count set

Full Usage: HashSet.count set

Parameters:
Returns: int
Modifiers: inline
Type parameters: 'T

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

set : HashSet<'T>
Returns: int

HashSet.difference set1 set2

Full Usage: HashSet.difference set1 set2

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Creates a new set containing all elements from set1 that are not int set2. `O(N + M)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: HashSet<'T>

HashSet.empty

Full Usage: HashSet.empty

Returns: HashSet<'T>

The empty set.

Returns: HashSet<'T>

HashSet.equals set1 set2

Full Usage: HashSet.equals set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if the two sets are equal. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.exists predicate set

Full Usage: HashSet.exists predicate set

Parameters:
    predicate : 'T -> bool
    set : HashSet<'T>

Returns: bool
Modifiers: inline
Type parameters: 'T

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

predicate : 'T -> bool
set : HashSet<'T>
Returns: bool

HashSet.filter predicate set

Full Usage: HashSet.filter predicate set

Parameters:
    predicate : 'T -> bool
    set : HashSet<'T>

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Creates a new set that contains all entries for which predicate was true. `O(N)`

predicate : 'T -> bool
set : HashSet<'T>
Returns: HashSet<'T>

HashSet.fold folder state set

Full Usage: HashSet.fold folder state set

Parameters:
    folder : 'S -> 'T -> 'S
    state : 'S
    set : HashSet<'T>

Returns: 'S
Modifiers: inline
Type parameters: 'S, 'T

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

folder : 'S -> 'T -> 'S
state : 'S
set : HashSet<'T>
Returns: 'S

HashSet.forall predicate set

Full Usage: HashSet.forall predicate set

Parameters:
    predicate : 'T -> bool
    set : HashSet<'T>

Returns: bool
Modifiers: inline
Type parameters: 'T

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

predicate : 'T -> bool
set : HashSet<'T>
Returns: bool

HashSet.intersect set1 set2

Full Usage: HashSet.intersect set1 set2

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Creates a new set containing all elements that are in set1 AND set2. `O(N + M)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: HashSet<'T>

HashSet.intersectMany sets

Full Usage: HashSet.intersectMany sets

Parameters:
    sets : 'a

Returns: HashSet<'T>

Creates a new set containing all elements that are in all the given sets.

sets : 'a
Returns: HashSet<'T>

HashSet.intersectionCount set1 set2

Full Usage: HashSet.intersectionCount set1 set2

Parameters:
Returns: int
Modifiers: inline
Type parameters: 'T

Returns the number of elements that are in both sets.

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: int

HashSet.isEmpty set

Full Usage: HashSet.isEmpty set

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Is the set empty? `O(1)`

set : HashSet<'T>
Returns: bool

HashSet.isProperSubset set1 set2

Full Usage: HashSet.isProperSubset set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if all elements from `set1` are in `set2` and `set2` contains at least one element that is not in `set1`. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.isProperSuperset set1 set2

Full Usage: HashSet.isProperSuperset set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if all elements from `set2` are in `set1` and `set1` contains at least one element that is not in `set3`. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.isSubset set1 set2

Full Usage: HashSet.isSubset set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if all elements from `set1` are in `set2`. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.isSuperset set1 set2

Full Usage: HashSet.isSuperset set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if all elements from `set2` are in `set1`. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.iter action set

Full Usage: HashSet.iter action set

Parameters:
    action : 'T -> unit
    set : HashSet<'T>

Modifiers: inline
Type parameters: 'T

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

action : 'T -> unit
set : HashSet<'T>

HashSet.map mapping set

Full Usage: HashSet.map mapping set

Parameters:
    mapping : 'T -> 'U
    set : HashSet<'T>

Returns: HashSet<'U>
Modifiers: inline
Type parameters: 'T, 'U

Creates a new set by applying the given function to all entries. `O(N)`

mapping : 'T -> 'U
set : HashSet<'T>
Returns: HashSet<'U>

HashSet.ofArray elements

Full Usage: HashSet.ofArray elements

Parameters:
    elements : 'T[]

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

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

elements : 'T[]
Returns: HashSet<'T>

HashSet.ofList elements

Full Usage: HashSet.ofList elements

Parameters:
    elements : 'T list

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

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

elements : 'T list
Returns: HashSet<'T>

HashSet.ofSeq elements

Full Usage: HashSet.ofSeq elements

Parameters:
    elements : 'T seq

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

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

elements : 'T seq
Returns: HashSet<'T>

HashSet.ofSet set

Full Usage: HashSet.ofSet set

Parameters:
    set : Set<'T>

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

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

set : Set<'T>
Returns: HashSet<'T>

HashSet.overlaps set1 set2

Full Usage: HashSet.overlaps set1 set2

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'T

Checks if the two sets have at least one element in common. `O(N)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: bool

HashSet.remove value set

Full Usage: HashSet.remove value set

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Removes the given value. `O(1)`

value : 'T
set : HashSet<'T>
Returns: HashSet<'T>

HashSet.single element

Full Usage: HashSet.single element

Parameters:
    element : 'T

Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

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

element : 'T
Returns: HashSet<'T>

HashSet.toArray set

Full Usage: HashSet.toArray set

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

Creates an array holding all values. `O(N)`

set : HashSet<'K>
Returns: 'K[]

HashSet.toList set

Full Usage: HashSet.toList set

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

Creates a list holding all values. `O(N)`

set : HashSet<'K>
Returns: 'K list

HashSet.toSeq set

Full Usage: HashSet.toSeq set

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

Creates a seq holding all values. `O(N)`

set : HashSet<'K>
Returns: 'K seq

HashSet.toSet set

Full Usage: HashSet.toSet set

Parameters:
Returns: Set<'T>
Modifiers: inline
Type parameters: 'T

Creates a Set holding all entries contained in the HashSet. `O(N * log N)`

set : HashSet<'T>
Returns: Set<'T>

HashSet.tryRemove value set

Full Usage: HashSet.tryRemove value set

Parameters:
Returns: HashSet<'T> option
Modifiers: inline
Type parameters: 'T

Tries to remove the given value from the set and returns the rest of the set. `O(1)`

value : 'T
set : HashSet<'T>
Returns: HashSet<'T> option

HashSet.tryRemoveV value set

Full Usage: HashSet.tryRemoveV value set

Parameters:
Returns: HashSet<'T> voption
Modifiers: inline
Type parameters: 'T
value : 'T
set : HashSet<'T>
Returns: HashSet<'T> voption

HashSet.union set1 set2

Full Usage: HashSet.union set1 set2

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Creates a new set containing all elements from set1 and set2. `O(N + M)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: HashSet<'T>

HashSet.unionMany sets

Full Usage: HashSet.unionMany sets

Parameters:
    sets : 'a

Returns: HashSet<'T>

Creates a new set containing all elements that are in at least one of the given sets.

sets : 'a
Returns: HashSet<'T>

HashSet.xor set1 set2

Full Usage: HashSet.xor set1 set2

Parameters:
Returns: HashSet<'T>
Modifiers: inline
Type parameters: 'T

Creates a new set containing all elements that are either in set1 or set2 (but not in both) `O(N + M)`

set1 : HashSet<'T>
set2 : HashSet<'T>
Returns: HashSet<'T>

Type something to start searching.