ASet Module
Operations on adaptive sets.
Functions and values
| Function or value |
Description
|
Full Usage:
average set
Parameters:
aset<^T>
Returns: aval<^T>
Modifiers: inline Type parameters: ^T (requires (static member DivideByInt : ^T * Microsoft.FSharp.Core.int -> ^T) and (static member get_Zero : -> ^T) and (static member op_Addition : ^T * ^T -> ^T) and (static member op_Subtraction : ^T * ^T -> ^T) and equality) |
|
Full Usage:
averageBy mapping set
Parameters:
'T -> ^U
set : aset<'T>
Returns: aval<^U>
Modifiers: inline Type parameters: 'T, ^U (requires equality and (static member DivideByInt : ^U * Microsoft.FSharp.Core.int -> ^U) and (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U) and equality) |
|
Full Usage:
averageByA mapping set
Parameters: Returns: aval<^U>
Modifiers: inline Type parameters: 'T, ^U (requires equality and (static member DivideByInt : ^U * Microsoft.FSharp.Core.int -> ^U) and (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U) and equality) |
|
|
Adaptively maps over the given value and returns the resulting set (FDA
Example
val selected: obj
val buckets: obj array
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val visible: obj
|
|
Adaptively maps over the two values and returns the resulting set (FDA
|
|
|
|
|
|
|
|
|
|
Adaptively maps over the given set and unions all resulting sets (FDA
Example
val buckets: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val odds: obj
val evens: obj
val all: obj
|
|
|
|
|
|
Adaptively tests if the set contains the given element. Per-element precise (O(1) on read) for a direct changeable source: a write to an unrelated element does not re-evaluate this value or its dependents. On a derived source the branch re-evaluates at most once per upstream change (pull-lazy: the per-element gate runs at the next read's drain).
|
|
|
|
|
Full Usage:
custom compute
Parameters:
IReadOnlySet<'T> -> SetDeltaBuilder<'T> -> unit
Returns: aset<'T>
Modifiers: inline Type parameters: 'T (requires equality) |
An adaptive set driven by a compute function (FDA
|
|
|
|
|
An empty adaptive set (FDA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Materializes the current state as an immutable FrozenSet<'T>. This is the only collection operation that allocates; the result is safe to retain and the library never touches it again. Runs the pending delta processing (drain) first.
|
|
Full Usage:
getValue set
Parameters:
aset<'T>
Returns: IReadOnlySet<'T>
Modifiers: inline Type parameters: 'T |
Returns a transient view of the current state. Valid only until the next write on the owner thread; do not retain or mutate it. Use force to materialize a snapshot that is safe to retain.
|
|
|
|
|
|
|
Full Usage:
mapUse mapping set
Parameters:
'A -> 'B
set : aset<'A>
Returns: IDisposable * aset<'B>
Modifiers: inline Type parameters: 'A, 'B (requires equality and equality and :> System.IDisposable) |
Maps every element, disposing the mapped value when its last source
occurrence leaves (FDA
Example
val src: obj
val cleanup: obj
val mapped: obj
val id: x: 'T -> 'T
|
|
|
Full Usage:
ofArray items
Parameters:
'T[]
Returns: aset<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
ofExternal snapshot
Parameters:
unit -> IReadOnlySet<'T>
Returns: aset<'T> * (unit -> unit)
Modifiers: inline Type parameters: 'T (requires equality) |
Creates an adaptive set from an external snapshot function and an
invalidate handle (FDA
Example
val mutable current: obj
val set: obj
val invalidate: (unit -> obj)
val forced: obj
|
|
|
Full Usage:
ofList items
Parameters:
'T list
Returns: aset<'T>
Modifiers: inline Type parameters: 'T |
|
|
An adaptive set over an external reader function. The reader is called
on every read (poll); the node diffs the result against its state and
emits the diff as the delta. Pull-based: nothing tells this node when
the underlying data changes, so consumers must re-read it (FDA
|
Full Usage:
ofSeq items
Parameters:
'T seq
Returns: aset<'T>
Modifiers: inline Type parameters: 'T |
|
|
|
Full Usage:
reduce reduction set
Parameters:
AdaptiveReduction<'a, 's, 'v>
set : aset<'a>
Returns: aval<'v>
Modifiers: inline Type parameters: 'a, 's, 'v (requires equality) |
Adaptively reduces the set with the given AdaptiveReduction.
The state is updated incrementally from deltas: added elements apply
|
Full Usage:
reduceBy reduction mapping set
Parameters:
AdaptiveReduction<'b, 's, 'v>
mapping : 'a -> 'b
set : aset<'a>
Returns: aval<'v>
Modifiers: inline Type parameters: 'b, 's, 'v, 'a (requires equality) |
Maps every element, then reduces the mapped values with the given AdaptiveReduction. The mapping runs per delta element.
|
Full Usage:
reduceByA reduction mapping set
Parameters:
AdaptiveReduction<'U, 's, 'v>
mapping : 'T -> aval<'U>
set : aset<'T>
Returns: aval<'v>
Modifiers: inline Type parameters: 'U, 's, 'v, 'T (requires equality and equality) |
Adaptively reduces the set after mapping every element to an adaptive
value (FDA
|
Full Usage:
single value
Parameters:
'T
Returns: aset<'T>
Modifiers: inline Type parameters: 'T |
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
sumByA mapping set
Parameters: Returns: aval<^U>
Modifiers: inline Type parameters: 'T, ^U (requires equality and (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U) and equality) |
|
|
Materializes the set as an adaptive value. Every change materializes a new immutable FrozenSet<'T> (the retain boundary, like force); the value is safe to retain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mibo