AdaptiveReduction Module
Combinators for building AdaptiveReduction values.
Functions and values
| Function or value |
Description
|
|
Counts the elements (FDA
|
|
Counts the elements for which the mapped value is false.
|
|
Counts the elements for which the mapped value is true.
|
Full Usage:
fold zero add
Parameters:
's
add : 's -> 'a -> 's
Returns: AdaptiveReduction<'a, 's, 's>
Modifiers: inline Type parameters: 's, 'a |
A reduction that recomputes the whole state on every removal.
|
Full Usage:
group zero add subtract
Parameters:
's
add : 's -> 'a -> 's
subtract : 's -> 'a -> 's
Returns: AdaptiveReduction<'a, 's, 's>
Modifiers: inline Type parameters: 's, 'a |
A reduction with an invertible subtract operation.
|
Full Usage:
halfGroup zero add trySubtract
Parameters:
's
add : 's -> 'a -> 's
trySubtract : 's -> 'a -> 's voption
Returns: AdaptiveReduction<'a, 's, 's>
Modifiers: inline Type parameters: 's, 'a |
A reduction whose subtract may fall back to a full recompute.
|
Full Usage:
mapIn mapping reduction
Parameters:
'a -> 'b
reduction : AdaptiveReduction<'b, 's, 'v>
Returns: AdaptiveReduction<'a, 's, 'v>
Modifiers: inline Type parameters: 'a, 'b, 's, 'v |
Maps the element side of a reduction (FDA
|
Full Usage:
mapOut mapping reduction
Parameters:
'v -> 'w
reduction : AdaptiveReduction<'a, 's, 'v>
Returns: AdaptiveReduction<'a, 's, 'w>
Modifiers: inline Type parameters: 'v, 'w, 'a, 's |
Maps the observed value of a reduction.
|
Full Usage:
par left right
Parameters:
AdaptiveReduction<'a, 's, 'v>
right : AdaptiveReduction<'a, 't, 'w>
Returns: AdaptiveReduction<'a, ('s * 't), ('v * 'w)>
Modifiers: inline Type parameters: 'a, 's, 'v, 't, 'w |
Composes two reductions over the same element in parallel (FDA
|
Full Usage:
structpar left right
Parameters:
AdaptiveReduction<'a, 's, 'v>
right : AdaptiveReduction<'a, 't, 'w>
Returns: AdaptiveReduction<'a, ('s * 't), ('v * 'w)>
Modifiers: inline Type parameters: 'a, 's, 'v, 't, 'w |
Composes two reductions over the same element in parallel (FDA
|
Full Usage:
sum ()
Parameters:
unit
Returns: AdaptiveReduction<^a, ^a, ^a>
Modifiers: inline Type parameters: ^a (requires (static member get_Zero : -> ^a) and (static member op_Addition : ^a * ^a -> ^a) and (static member op_Subtraction : ^a * ^a -> ^a)) |
Sums the mapped values. Needs an additive numeric type.
|
Full Usage:
tryMax ()
Parameters:
unit
Returns: AdaptiveReduction<'a, 'a voption, 'a voption>
Modifiers: inline Type parameters: 'a (requires comparison) |
The maximum of the mapped values, or ValueNone when empty. A removal recomputes.
|
Full Usage:
tryMin ()
Parameters:
unit
Returns: AdaptiveReduction<'a, 'a voption, 'a voption>
Modifiers: inline Type parameters: 'a (requires comparison) |
The minimum of the mapped values, or ValueNone when empty. A removal recomputes.
|
Mibo