Header menu logo FSharp.Data.Adaptive

CountingHashSet<'T> Type

A reference counting set, used for tracing the unions of sets with elements in common.

Constructors

Constructor Description

CountingHashSet(store)

Full Usage: CountingHashSet(store)

Parameters:
Returns: CountingHashSet<'T>
store : HashMap<'T, int>
Returns: CountingHashSet<'T>

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    value : 'T

Returns: CountingHashSet<'T>

Adds the given value to the set. (one reference)

value : 'T
Returns: CountingHashSet<'T>

this.AddAll

Full Usage: this.AddAll

Returns: HashSetDelta<'T>

Same as empty.ComputeDelta(x)

Returns: HashSetDelta<'T>

this.Alter

Full Usage: this.Alter

Parameters:
    value : 'T
    f : int -> int

Returns: CountingHashSet<'T>

Changes the reference-count for the given element.

value : 'T
f : int -> int
Returns: CountingHashSet<'T>

this.ApplyDelta

Full Usage: this.ApplyDelta

Parameters:
Returns: CountingHashSet<'T> * HashSetDelta<'T>

Integrates the given delta into the set, returns a new set and the effective deltas.

deltas : HashSetDelta<'T>
Returns: CountingHashSet<'T> * HashSetDelta<'T>

this.ApplyDeltaNoRefCount

Full Usage: this.ApplyDeltaNoRefCount

Parameters:
Returns: CountingHashSet<'T> * HashSetDelta<'T>

Integrates the given delta into the set, returns a new set and the effective deltas.

deltas : HashSetDelta<'T>
Returns: CountingHashSet<'T> * HashSetDelta<'T>

this.Choose

Full Usage: this.Choose

Parameters:
    mapping : 'T -> 'B option

Returns: CountingHashSet<'B>

Creates a new set by applying the given function to all elements.

mapping : 'T -> 'B option
Returns: CountingHashSet<'B>

this.Collect

Full Usage: this.Collect

Parameters:
Returns: HashMap<'B, int>

Creates a new set with all elements from all created sets. (respecting ref-counts)

mapping : 'T -> CountingHashSet<'B>
Returns: HashMap<'B, int>

this.ComputeDelta

Full Usage: this.ComputeDelta

Parameters:
Returns: HashSetDelta<'T>

Differentiates two sets returning a HashSetDelta.

other : CountingHashSet<'T>
Returns: HashSetDelta<'T>

this.Contains

Full Usage: this.Contains

Parameters:
    value : 'T

Returns: bool

Checks whether the given value is contained in the set.

value : 'T
Returns: bool

this.Count

Full Usage: this.Count

Returns: int

The number of entries in the set (excluding ref-counts).

Returns: int

this.Difference

Full Usage: this.Difference

Parameters:
Returns: CountingHashSet<'T>

Computes the set difference for both sets. (this - other)

other : CountingHashSet<'T>
Returns: CountingHashSet<'T>

this.Exists

Full Usage: this.Exists

Parameters:
    predicate : 'T -> bool

Returns: bool

Checks whether an element fulfilling the predicate exists.

predicate : 'T -> bool
Returns: bool

this.Filter

Full Usage: this.Filter

Parameters:
    predicate : 'T -> bool

Returns: CountingHashSet<'T>

Creates a new set filtered by the given predicate.

predicate : 'T -> bool
Returns: CountingHashSet<'T>

this.Fold

Full Usage: this.Fold

Parameters:
    seed : 'S
    folder : 'S -> 'T -> 'S

Returns: 'S

Folds over all elements in the set.

seed : 'S
folder : 'S -> 'T -> 'S
Returns: 'S

this.Forall

Full Usage: this.Forall

Parameters:
    predicate : 'T -> bool

Returns: bool

Checks whether all elements fulfill the predicate.

predicate : 'T -> bool
Returns: bool

this.GetEnumerator

Full Usage: this.GetEnumerator

Returns: HashSetEnumerator<'T>
Returns: HashSetEnumerator<'T>

this.GetRefCount

Full Usage: this.GetRefCount

Parameters:
    value : 'T

Returns: int

Gets the reference-count for the given value (0 if not contained)

value : 'T
Returns: int

this.Intersect

Full Usage: this.Intersect

Parameters:
Returns: CountingHashSet<'T>

Computes the intersection of both sets.

other : CountingHashSet<'T>
Returns: CountingHashSet<'T>

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

Is the set empty?

Returns: bool

this.Iter

Full Usage: this.Iter

Parameters:
    iterator : 'T -> unit

Iterates over all set elements. (once)

iterator : 'T -> unit

this.Map

Full Usage: this.Map

Parameters:
    mapping : 'T -> 'B

Returns: CountingHashSet<'B>

Creates a new set by applying the given function to all elements.

mapping : 'T -> 'B
Returns: CountingHashSet<'B>

this.Remove

Full Usage: this.Remove

Parameters:
    value : 'T

Returns: CountingHashSet<'T>

Removes the given value from the set. (one reference)

value : 'T
Returns: CountingHashSet<'T>

this.RemoveAll

Full Usage: this.RemoveAll

Returns: HashSetDelta<'T>

Same as x.ComputeDelta(empty)

Returns: HashSetDelta<'T>

this.ToArray

Full Usage: this.ToArray

Returns: 'T[]

All elements in the set.

Returns: 'T[]

this.ToHashMap

Full Usage: this.ToHashMap

Returns: HashMap<'T, int>

Gets the HashMap representation of the set.

Returns: HashMap<'T, int>

this.ToHashSet

Full Usage: this.ToHashSet

Returns: HashSet<'T>

Creates a HashSet with the same entries.

Returns: HashSet<'T>

this.ToList

Full Usage: this.ToList

Returns: 'T list

All elements in the set.

Returns: 'T list

this.ToSeq

Full Usage: this.ToSeq

Returns: 'T seq

All elements in the set.

Returns: 'T seq

this.Union

Full Usage: this.Union

Parameters:
Returns: CountingHashSet<'T>

Unions the two sets.

other : CountingHashSet<'T>
Returns: CountingHashSet<'T>

this.UnionWith

Full Usage: this.UnionWith

Parameters:
Returns: CountingHashSet<'T>

Unions both sets using resolve to aggregate ref-counts.

other : CountingHashSet<'T>
resolve : int -> int -> int
Returns: CountingHashSet<'T>

this.Xor

Full Usage: this.Xor

Parameters:
Returns: CountingHashSet<'T>

Computes the exclusive or of both sets.

other : CountingHashSet<'T>
Returns: CountingHashSet<'T>

Static members

Static member Description

CountingHashSet.Empty

Full Usage: CountingHashSet.Empty

Returns: CountingHashSet<'T>

The empty set.

Returns: CountingHashSet<'T>

CountingHashSet.OfArray(arr)

Full Usage: CountingHashSet.OfArray(arr)

Parameters:
    arr : 'T[]

Returns: CountingHashSet<'T>

Creates a set holding all the given values. (with reference counts)

arr : 'T[]
Returns: CountingHashSet<'T>

CountingHashSet.OfHashMap(map)

Full Usage: CountingHashSet.OfHashMap(map)

Parameters:
Returns: CountingHashSet<'T>

Creates a set holding all the given values. (with reference counts)

map : HashMap<'T, int>
Returns: CountingHashSet<'T>

CountingHashSet.OfHashSet(set)

Full Usage: CountingHashSet.OfHashSet(set)

Parameters:
Returns: CountingHashSet<'T>

Creates a set holding all the given values.

set : HashSet<'T>
Returns: CountingHashSet<'T>

CountingHashSet.OfList(list)

Full Usage: CountingHashSet.OfList(list)

Parameters:
    list : 'T list

Returns: CountingHashSet<'T>

Creates a set holding all the given values. (with reference counts)

list : 'T list
Returns: CountingHashSet<'T>

CountingHashSet.OfSeq(seq)

Full Usage: CountingHashSet.OfSeq(seq)

Parameters:
    seq : 'T seq

Returns: CountingHashSet<'T>

Creates a set holding all the given values. (with reference counts)

seq : 'T seq
Returns: CountingHashSet<'T>

CountingHashSet.Trace

Full Usage: CountingHashSet.Trace

Returns: Traceable<CountingHashSet<'T>, HashSetDelta<'T>>

Traceable instance.

Returns: Traceable<CountingHashSet<'T>, HashSetDelta<'T>>

CountingHashSet.TraceNoRefCount

Full Usage: CountingHashSet.TraceNoRefCount

Returns: Traceable<CountingHashSet<'T>, HashSetDelta<'T>>

Traceable instance without ref-counting.

Returns: Traceable<CountingHashSet<'T>, HashSetDelta<'T>>

Type something to start searching.