Logo Mibo

AdaptiveReduction<'a, 's, 'v> Type

An incremental reduction protocol over elements of type 'a: the state 's is updated with add for added elements and sub for removed ones. sub returns ValueNone when it cannot invert the removal; the library then recomputes the state from the current collection. view projects the state to the observed value.

Parity: FDA AdaptiveReduction (AdaptiveValue/AdaptiveReduction.fs). Order of element application is undefined.

Record fields

Record Field Description

add

Full Usage: add

Field type: 's -> 'a -> 's

Applies one added element to the state.

Field type: 's -> 'a -> 's

seed

Full Usage: seed

Field type: 's

The initial state.

Field type: 's

sub

Full Usage: sub

Field type: 's -> 'a -> 's voption

Inverts one removed element. Returns ValueNone when the removal cannot be inverted; the library recomputes from the current collection.

Field type: 's -> 'a -> 's voption

view

Full Usage: view

Field type: 's -> 'v

Projects the state to the observed value.

Field type: 's -> 'v

Type something to start searching.