Aardvark.Base.Incremental


ReferenceCountingSet<'a>

represents a set of elements having a reference count. this means that an element is contained when it has been added at least once more than removed.

Constructors

ConstructorDescription
new()
Signature: unit -> ReferenceCountingSet<'a>
new(initial)
Signature: initial:seq<'a> -> ReferenceCountingSet<'a>

Instance members

Instance memberDescription
Add(v)
Signature: v:'a -> bool

adds an element to the ReferenceCountingSet and returns true if the element was not contained in the set before this operation.

Clear()
Signature: unit -> unit

clears the entire set

Contains(v)
Signature: v:'a -> bool

checks if the set contains a specific element

Count
Signature: int

returns the number of (distinct) elements contained in the set.

ExceptWith(items)
Signature: items:seq<'a> -> unit

Remove items in other from this set. Modifies this set.

GetReferenceCount(v)
Signature: v:'?8257 -> int

gets the current reference count for the given element

IntersectWith(other)
Signature: other:seq<'a> -> unit

Takes the intersection of this set with other. Modifies this set.

IsProperSubsetOf(other)
Signature: other:seq<'a> -> bool

determines if the set is a proper subset of the given sequence

IsProperSupersetOf(other)
Signature: other:seq<'a> -> bool

determines if the set is a proper superset of the given sequence

IsSubsetOf(other)
Signature: other:seq<'a> -> bool

Sets the contents of the set to other's contents returning a list of Deltas which need to be performed in order to reproduce the transition. Runtime: O[(LookUp + AddRem) * (this.Count + other.Count)]

IsSupersetOf(other)
Signature: other:seq<'a> -> bool

determines if the set is a superset of the given sequence

Overlaps(other)
Signature: other:seq<'a> -> bool

determines if the set and the given sequence overlap

Remove(v)
Signature: v:'a -> bool

removes an element from the ReferenceCountingSet and returns true if the element is no longer contained after the operation.

SetEquals(other)
Signature: other:seq<'a> -> bool

determines if the set is equal (set) to the given sequence

SymmetricExceptWith(other)
Signature: other:seq<'a> -> unit

Takes symmetric difference (XOR) with other and this set. Modifies this set.

UnionWith(other)
Signature: other:seq<'a> -> unit

Take the union of this set with other. Modifies this set.

Fork me on GitHub