Header menu logo FSharp.Data.Adaptive

ASet Module

Functional operators for aset<_>

Functions and values

Function or value Description

average set

Full Usage: average set

Parameters:
Returns: aval<^S>
Modifiers: inline
Type parameters: ^T, ^S

Adaptively computes the average of all entries in the set.

set : aset<^T>
Returns: aval<^S>

averageBy mapping set

Full Usage: averageBy mapping set

Parameters:
    mapping : 'T1 -> ^T2
    set : aset<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the average of all values returned by mapping for the set.

mapping : 'T1 -> ^T2
set : aset<'T1>
Returns: aval<^S>

averageByA mapping set

Full Usage: averageByA mapping set

Parameters:
    mapping : 'T1 -> aval<^T2>
    set : aset<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the average of all values returned by mapping for the set.

mapping : 'T1 -> aval<^T2>
set : aset<'T1>
Returns: aval<^S>

bind mapping value

Full Usage: bind mapping value

Parameters:
    mapping : 'A -> aset<'B>
    value : aval<'A>

Returns: aset<'B>

Adaptively maps over the given aval and returns the resulting set.

mapping : 'A -> aset<'B>
value : aval<'A>
Returns: aset<'B>

bind2 mapping valueA valueB

Full Usage: bind2 mapping valueA valueB

Parameters:
    mapping : 'A -> 'B -> aset<'C>
    valueA : aval<'A>
    valueB : aval<'B>

Returns: aset<'C>

Adaptively maps over the given avals and returns the resulting set.

mapping : 'A -> 'B -> aset<'C>
valueA : aval<'A>
valueB : aval<'B>
Returns: aset<'C>

bind3 mapping valueA valueB valueC

Full Usage: bind3 mapping valueA valueB valueC

Parameters:
    mapping : 'A -> 'B -> 'C -> aset<'D>
    valueA : aval<'A>
    valueB : aval<'B>
    valueC : aval<'C>

Returns: aset<'D>

Adaptively maps over the given avals and returns the resulting set.

mapping : 'A -> 'B -> 'C -> aset<'D>
valueA : aval<'A>
valueB : aval<'B>
valueC : aval<'C>
Returns: aset<'D>

choose mapping set

Full Usage: choose mapping set

Parameters:
    mapping : 'A -> 'B option
    set : aset<'A>

Returns: aset<'B>

Adaptively chooses all elements returned by mapping.

mapping : 'A -> 'B option
set : aset<'A>
Returns: aset<'B>

chooseA mapping set

Full Usage: chooseA mapping set

Parameters:
    mapping : 'A -> aval<'B option>
    set : aset<'A>

Returns: aset<'B>

Adaptively maps over the set and also respects inner changes.

mapping : 'A -> aval<'B option>
set : aset<'A>
Returns: aset<'B>

collect mapping set

Full Usage: collect mapping set

Parameters:
    mapping : 'A -> aset<'B>
    set : aset<'A>

Returns: aset<'B>

Adaptively maps over the given set and unions all resulting sets.

mapping : 'A -> aset<'B>
set : aset<'A>
Returns: aset<'B>

collect' mapping set

Full Usage: collect' mapping set

Parameters:
    mapping : 'A -> 'B seq
    set : aset<'A>

Returns: aset<'B>

Adaptively maps over the given set and unions all resulting seqs.

mapping : 'A -> 'B seq
set : aset<'A>
Returns: aset<'B>

constant value

Full Usage: constant value

Parameters:
Returns: aset<'T>

Creates an aset using the given set generator

value : unit -> HashSet<'T>
Returns: aset<'T>

contains value set

Full Usage: contains value set

Parameters:
    value : 'T
    set : aset<'T>

Returns: aval<bool>

Adaptively checks whether the aset contains the given entry.

value : 'T
set : aset<'T>
Returns: aval<bool>

count arg1

Full Usage: count arg1

Parameters:
Returns: aval<int>

Adaptively gets the number of elements in the set.

arg0 : aset<'T>
Returns: aval<int>

countBy predicate set

Full Usage: countBy predicate set

Parameters:
    predicate : 'a -> bool
    set : aset<'a>

Returns: aval<int>

Adaptively counts all elements fulfilling the predicate

predicate : 'a -> bool
set : aset<'a>
Returns: aval<int>

countByA predicate set

Full Usage: countByA predicate set

Parameters:
    predicate : 'a -> aval<bool>
    set : aset<'a>

Returns: aval<int>

Adaptively counts all elements fulfilling the predicate

predicate : 'a -> aval<bool>
set : aset<'a>
Returns: aval<int>

custom compute

Full Usage: custom compute

Parameters:
Returns: aset<'T>

Creates an aset using the given compute function

compute : AdaptiveToken -> CountingHashSet<'T> -> HashSetDelta<'T>
Returns: aset<'T>

delay create

Full Usage: delay create

Parameters:
Returns: aset<'T>

Creates a constant aset lazy content.

create : unit -> HashSet<'T>
Returns: aset<'T>

difference a b

Full Usage: difference a b

Parameters:
Returns: aset<'T>

Adaptively subtracts the given sets.

a : aset<'T>
b : aset<'T>
Returns: aset<'T>

empty

Full Usage: empty

Returns: aset<'T>

The empty aset.

Returns: aset<'T>

exists predicate set

Full Usage: exists predicate set

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

Returns: aval<bool>

Adaptively checks whether the predicate holds for at least one entry.

predicate : 'T -> bool
set : aset<'T>
Returns: aval<bool>

existsA predicate set

Full Usage: existsA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for at least one entry.

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aval<bool>

filter predicate set

Full Usage: filter predicate set

Parameters:
    predicate : 'A -> bool
    set : aset<'A>

Returns: aset<'A>

Adaptively filters the set using the given predicate.

predicate : 'A -> bool
set : aset<'A>
Returns: aset<'A>

filterA predicate set

Full Usage: filterA predicate set

Parameters:
    predicate : 'A -> aval<bool>
    set : aset<'A>

Returns: aset<'A>

Adaptively filters the set and also respects inner changes.

predicate : 'A -> aval<bool>
set : aset<'A>
Returns: aset<'A>

flattenA set

Full Usage: flattenA set

Parameters:
Returns: aset<'A>

Adaptively flattens the set of adaptive refs.

set : aset<aval<'A>>
Returns: aset<'A>

fold add zero set

Full Usage: fold add zero set

Parameters:
    add : 'S -> 'A -> 'S
    zero : 'S
    set : aset<'A>

Returns: aval<'S>

Adaptively folds over the set using add for additions and recomputes the value on every removal. Note that the order of elements given to add is undefined.

add : 'S -> 'A -> 'S
zero : 'S
set : aset<'A>
Returns: aval<'S>

foldGroup add subtract zero set

Full Usage: foldGroup add subtract zero set

Parameters:
    add : 'S -> 'A -> 'S
    subtract : 'S -> 'A -> 'S
    zero : 'S
    set : aset<'A>

Returns: aval<'S>

Adaptively folds over the set using add for additions and subtract for removals. Note that the order of elements given to add/subtract is undefined.

add : 'S -> 'A -> 'S
subtract : 'S -> 'A -> 'S
zero : 'S
set : aset<'A>
Returns: aval<'S>

foldHalfGroup add trySubtract zero set

Full Usage: foldHalfGroup add trySubtract zero set

Parameters:
    add : 'S -> 'A -> 'S
    trySubtract : 'S -> 'A -> 'S option
    zero : 'S
    set : aset<'A>

Returns: aval<'S>

Adaptively folds over the set using add for additions and trySubtract for removals. Note the trySubtract may return None indicating that the result needs to be recomputed. Also note that the order of elements given to add/trySubtract is undefined.

add : 'S -> 'A -> 'S
trySubtract : 'S -> 'A -> 'S option
zero : 'S
set : aset<'A>
Returns: aval<'S>

forall predicate set

Full Usage: forall predicate set

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

Returns: aval<bool>

Adaptively checks whether the predicate holds for all entries.

predicate : 'T -> bool
set : aset<'T>
Returns: aval<bool>

forallA predicate set

Full Usage: forallA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for all entries.

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aval<bool>

force arg1

Full Usage: force arg1

Parameters:
Returns: HashSet<'T>

Evaluates the given adaptive set and returns its current content. This should not be used inside the adaptive evaluation of other AdaptiveObjects since it does not track dependencies.

arg0 : aset<'T>
Returns: HashSet<'T>

intersect a b

Full Usage: intersect a b

Parameters:
Returns: aset<'T>

Adaptively intersects the given sets

a : aset<'T>
b : aset<'T>
Returns: aset<'T>

isEmpty arg1

Full Usage: isEmpty arg1

Parameters:
Returns: aval<bool>

Adaptively tests if the set is empty.

arg0 : aset<'T>
Returns: aval<bool>

map mapping set

Full Usage: map mapping set

Parameters:
    mapping : 'A -> 'B
    set : aset<'A>

Returns: aset<'B>

Adaptively maps over the given set.

mapping : 'A -> 'B
set : aset<'A>
Returns: aset<'B>

mapA mapping set

Full Usage: mapA mapping set

Parameters:
    mapping : 'A -> aval<'B>
    set : aset<'A>

Returns: aset<'B>

Adaptively maps over the set and also respects inner changes.

mapping : 'A -> aval<'B>
set : aset<'A>
Returns: aset<'B>

mapUse mapping set

Full Usage: mapUse mapping set

Parameters:
    mapping : 'A -> 'B
    set : aset<'A>

Returns: IDisposable * aset<'B>

Adaptively maps over the given set and disposes all removed values while active. Additionally the returned Disposable disposes all currently existing values and clears the resulting set.

mapping : 'A -> 'B
set : aset<'A>
Returns: IDisposable * aset<'B>

ofAVal value

Full Usage: ofAVal value

Parameters:
Returns: aset<'A>

Creates an aset for the given aval.

value : aval<'a>
Returns: aset<'A>

ofArray elements

Full Usage: ofArray elements

Parameters:
    elements : 'T[]

Returns: aset<'T>

Creates an aset holding the given values.

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

ofHashSet elements

Full Usage: ofHashSet elements

Parameters:
Returns: aset<'T>

Creates an aset holding the given values. `O(1)`

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

ofList elements

Full Usage: ofList elements

Parameters:
    elements : 'T list

Returns: aset<'T>

Creates an aset holding the given values.

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

ofReader create

Full Usage: ofReader create

Parameters:
    create : unit -> 'a

Returns: aset<'T>

Creates an aset using the given reader-creator.

create : unit -> 'a
Returns: aset<'T>

ofSeq elements

Full Usage: ofSeq elements

Parameters:
    elements : 'T seq

Returns: aset<'T>

Creates an aset holding the given values.

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

range lowerBound upperBound

Full Usage: range lowerBound upperBound

Parameters:
    lowerBound : aval<^T>
    upperBound : aval<^T>

Returns: aset<^T>
Modifiers: inline
Type parameters: ^T

Generate an adaptive range of items based on lower/upper bound

lowerBound : aval<^T>
upperBound : aval<^T>
Returns: aset<^T>

reduce reduction set

Full Usage: reduce reduction set

Parameters:
Returns: aval<'V>

Reduces the set using the given `AdaptiveReduction` and returns the resulting adaptive value.

reduction : AdaptiveReduction<'T, 'S, 'V>
set : aset<'T>
Returns: aval<'V>

reduceBy reduction mapping set

Full Usage: reduceBy reduction mapping set

Parameters:
Returns: aval<'V>

Applies the mapping function to all elements of the set and reduces the results using the given `AdaptiveReduction`. Returns the resulting adaptive value.

reduction : AdaptiveReduction<'T2, 'S, 'V>
mapping : 'T1 -> 'T2
set : aset<'T1>
Returns: aval<'V>

reduceByA reduction mapping set

Full Usage: reduceByA reduction mapping set

Parameters:
Returns: aval<'V>

Applies the mapping function to all elements of the set and reduces the results using the given `AdaptiveReduction`. Returns the resulting adaptive value.

reduction : AdaptiveReduction<'T2, 'S, 'V>
mapping : 'T1 -> aval<'T2>
set : aset<'T1>
Returns: aval<'V>

single value

Full Usage: single value

Parameters:
    value : 'T

Returns: aset<'T>

A constant aset holding a single value.

value : 'T
Returns: aset<'T>

sum set

Full Usage: sum set

Parameters:
Returns: aval<^S>
Modifiers: inline
Type parameters: ^T, ^S

Adaptively computes the sum of all entries in the set.

set : aset<^T>
Returns: aval<^S>

sumBy mapping set

Full Usage: sumBy mapping set

Parameters:
    mapping : 'T1 -> ^T2
    set : aset<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the sum of all values returned by mapping for the set.

mapping : 'T1 -> ^T2
set : aset<'T1>
Returns: aval<^S>

sumByA mapping set

Full Usage: sumByA mapping set

Parameters:
    mapping : 'T1 -> aval<^T2>
    set : aset<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the sum of all values returned by mapping for the set.

mapping : 'T1 -> aval<^T2>
set : aset<'T1>
Returns: aval<^S>

toAVal set

Full Usage: toAVal set

Parameters:
Returns: aval<HashSet<'T>>

Creates an aval providing access to the current content of the set.

set : aset<'T>
Returns: aval<HashSet<'T>>

tryMax set

Full Usage: tryMax set

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

Adaptively tries to find the largest element.

set : aset<'T>
Returns: aval<'T option>

tryMin set

Full Usage: tryMin set

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

Adaptively tries to find the smallest element.

set : aset<'T>
Returns: aval<'T option>

union a b

Full Usage: union a b

Parameters:
Returns: aset<'A>

Adaptively unions the given sets

a : aset<'A>
b : aset<'A>
Returns: aset<'A>

unionMany sets

Full Usage: unionMany sets

Parameters:
Returns: aset<'A>

Adaptively unions all the given sets

sets : aset<aset<'A>>
Returns: aset<'A>

xor a b

Full Usage: xor a b

Parameters:
Returns: aset<'T>

Adaptively 'xors' the given sets.

a : aset<'T>
b : aset<'T>
Returns: aset<'T>

Type something to start searching.