Logo Mibo

MapCountNode<'K, 'V, 'Out> Type

A count over an adaptive map, projected through view (the node behind AMap.count with id and AMap.isEmpty with fun c -> c = 0). Registers nothing: the count is re-read at the next read after a write (O(1) for a materialized source); the version advances only when the projected output changed, so an update of an existing key (no count change) or a count change that the projection collapses (2 -> 3 under isEmpty) costs this node and its consumers nothing.

No mirror is kept: the source view's Count is exact (it already distinguishes a Set on a new key from an update of an existing one). The view projection runs at re-sync time: keep it cheap (the built-in uses are id and fun c -> c = 0).

Constructors

Constructor Description

MapCountNode(source, view)

Full Usage: MapCountNode(source, view)

Parameters:
Returns: MapCountNode<'K, 'V, 'Out>
source : IAdaptiveMap<'K, 'V>
view : int -> 'Out
Returns: MapCountNode<'K, 'V, 'Out>

Type something to start searching.