Logo Mibo

CSet Module

Operations on changeable sets.

Functions and values

Function or value Description

add item set

Full Usage: add item set

Parameters:
    item : 'T
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Adds an element. No-op when already present.

item : 'T
set : cset<'T>

empty

Full Usage: empty

Returns: cset<'T>
Modifiers: inline
Type parameters: 'T

An empty changeable set.

Returns: cset<'T>

exceptWith other set

Full Usage: exceptWith other set

Parameters:
    other : 'T seq
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Removes all the given elements (FDA cset.ExceptWith parity; one atomic batch).

other : 'T seq
set : cset<'T>

force set

Full Usage: force set

Parameters:
Returns: FrozenSet<'T>
Modifiers: inline
Type parameters: 'T

Materializes the current state as an immutable snapshot.

set : cset<'T>
Returns: FrozenSet<'T>

intersectWith other set

Full Usage: intersectWith other set

Parameters:
    other : 'T seq
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Keeps only the elements also present in other (FDA cset.IntersectWith parity; one atomic batch).

other : 'T seq
set : cset<'T>

ofSeq items

Full Usage: ofSeq items

Parameters:
    items : 'T seq

Returns: cset<'T>
Modifiers: inline
Type parameters: 'T

A changeable set with the given items.

items : 'T seq
Returns: cset<'T>

perform delta set

Full Usage: perform delta set

Parameters:
Type parameters: 'T

Applies a batch of set operations (FDA cset.Perform parity). The batch is applied atomically: sinks receive one net delta. Adding and removing the same element within the batch cancels.

delta : SetDeltaBuilder<'T>
set : cset<'T>

postAdd item set

Full Usage: postAdd item set

Parameters:
    item : 'T
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Posts an add (the cval.Post handoff pattern): queues the operation and returns immediately. Safe from any thread. The owner thread applies the queued operations at the next graph operation (reads and writes auto-drain) or at Posting.pump, as one batch: one net delta, one notification delivery. A burst is coalesced into a single handoff.

item : 'T
set : cset<'T>
Example

 // worker thread
 CSet.postAdd item items
 // owner thread: the next read applies the post automatically
 let view = ASet.force items
val view: obj

postRemove item set

Full Usage: postRemove item set

Parameters:
    item : 'T
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Posts a remove. Safe from any thread. See postAdd for the application contract.

item : 'T
set : cset<'T>

postSet value set

Full Usage: postSet value set

Parameters:
Modifiers: inline
Type parameters: 'T (requires comparison)

Posts a full replace. Safe from any thread. See postAdd for the application contract; a posted replace supersedes the other ops of the same pending batch (the transaction semantics of set).

value : Set<'T>
set : cset<'T>

remove item set

Full Usage: remove item set

Parameters:
    item : 'T
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Removes an element. No-op when absent.

item : 'T
set : cset<'T>

set value set

Full Usage: set value set

Parameters:
Modifiers: inline
Type parameters: 'T (requires comparison)

Replaces the whole set.

value : Set<'T>
set : cset<'T>

toSet set

Full Usage: toSet set

Parameters:
Returns: Set<'T>
Modifiers: inline
Type parameters: 'T (requires comparison)

Materializes the F# Set counterpart.

set : cset<'T>
Returns: Set<'T>

unionWith other set

Full Usage: unionWith other set

Parameters:
    other : 'T seq
    set : cset<'T>

Modifiers: inline
Type parameters: 'T

Adds all the given elements (FDA cset.UnionWith parity; one atomic batch).

other : 'T seq
set : cset<'T>

updateTo target set

Full Usage: updateTo target set

Parameters:
    target : 'T seq
    set : cset<'T>

Returns: bool
Modifiers: inline
Type parameters: 'T

Replaces the whole set and returns whether the content changed (FDA cset.UpdateTo parity). An equal target marks nothing.

target : 'T seq
set : cset<'T>
Returns: bool

value set

Full Usage: value set

Parameters:
Returns: aset<'T>
Modifiers: inline
Type parameters: 'T

Views the changeable set as an adaptive set.

set : cset<'T>
Returns: aset<'T>

Type something to start searching.