Set Routines
19 nodes
On this page 19
Add
FunctionThis node carries no documentation.
Add(set: Set of T, item: T) -> Truth
bool Add(HashSet<T> set, T item)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| item | T | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Clear
FunctionRemoves every element from the set, in place; the set itself stays usable and keeps its equality rule.
Clear(set: Set of T)
void Clear(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to empty. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Clone
FunctionAn independent copy of the set with the same elements and the same equality rule, so that changing one does not change the other. The elements themselves are shared, not copied.
Clone(set: Set of T) -> Set of T
HashSet<T> Clone(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to copy. |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Comparer
FunctionThe equality rule the set uses to decide which elements are the same, for creating another set that behaves alike.
Comparer(set: Set of T) -> IEqualityComparer<T>
IEqualityComparer<T> Comparer(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to inspect. |
Returns
| result | IEqualityComparer<T> |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Contains
FunctionWhether the set holds an element equal to Item, by the set's own equality rule; this is a fast lookup, however large the set.
Contains(set: Set of T, item: T) -> Truth
bool Contains(HashSet<T> set, T item)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to search. |
| item | T | — | The element to look for. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Count
FunctionHow many elements the set holds.
Count(set: Set of T) -> Integer
int Count(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to measure. |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Create
FunctionOverload 1 of 5
Create() -> Set of T
HashSet<T> Create()
A new, empty set that compares its elements by their default equality.
Returns
| result | Set of T |
Overload 2 of 5
Create(capacity: Integer) -> Set of T
HashSet<T> Create(int capacity)
A new, empty set with room for Capacity elements before it has to grow, for when the final size is known in advance. Throws System.ArgumentOutOfRangeException when Capacity is negative.
Parameters
| name | type | default | description |
|---|---|---|---|
| capacity | Integer | — | How many elements to make room for. |
Returns
| result | Set of T |
Overload 3 of 5
Create(comparer: IEqualityComparer<T>) -> Set of T
HashSet<T> Create(IEqualityComparer<T> comparer)
A new, empty set that uses Comparer to decide which elements are the same, for example text compared without regard to case.
Parameters
| name | type | default | description |
|---|---|---|---|
| comparer | IEqualityComparer<T> | — | Decides whether two elements are equal; null uses the default equality. |
Returns
| result | Set of T |
Overload 4 of 5
Create(source: IEnumerable<T>) -> Set of T
HashSet<T> Create(IEnumerable<T> source)
A new set holding the elements of a sequence, with duplicates dropped, compared by their default equality.
Parameters
| name | type | default | description |
|---|---|---|---|
| source | IEnumerable<T> | — | The elements to put in the set. |
Returns
| result | Set of T |
Overload 5 of 5
Create -> Set of T
source: IEnumerable<T>
comparer: IEqualityComparer<T>HashSet<T> Create(
IEnumerable<T> source,
IEqualityComparer<T> comparer)A new set holding the elements of a sequence, with Comparer deciding which ones are duplicates; the set keeps using it afterwards.
Parameters
| name | type | default | description |
|---|---|---|---|
| source | IEnumerable<T> | — | The elements to put in the set. |
| comparer | IEqualityComparer<T> | — | Decides whether two elements are equal; null uses the default equality. |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Except
FunctionThe first operand's elements minus the second's, in a new set; both operands untouched.
Except(set: Set of T, other: IEnumerable<T>) -> Set of T
HashSet<T> Except(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| other | IEnumerable<T> | — |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Intersect
FunctionOnly the elements both operands have, in a new set; both operands untouched.
Intersect(set: Set of T, other: IEnumerable<T>) -> Set of T
HashSet<T> Intersect(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| other | IEnumerable<T> | — |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Is Empty
FunctionWhether the set holds no elements.
IsEmpty(set: Set of T) -> Truth
bool IsEmpty(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to test. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Is Subset Of
FunctionWhether every element of Set is also in Other, by the set's equality rule. An empty set is a subset of anything, and a set is a subset of itself.
IsSubsetOf(set: Set of T, other: IEnumerable<T>) -> Truth
bool IsSubsetOf(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set that should be contained. |
| other | IEnumerable<T> | — | The elements it should be contained in; duplicates and order do not matter. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Is Superset Of
FunctionWhether every element of Other is also in Set, by the set's equality rule. Any set is a superset of an empty sequence.
IsSupersetOf(set: Set of T, other: IEnumerable<T>) -> Truth
bool IsSupersetOf(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set that should contain the elements. |
| other | IEnumerable<T> | — | The elements it should contain; duplicates and order do not matter. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Overlaps
FunctionWhether the set and the other elements have at least one element in common, by the set's equality rule; false when either is empty.
Overlaps(set: Set of T, other: IEnumerable<T>) -> Truth
bool Overlaps(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to test. |
| other | IEnumerable<T> | — | The elements to look for in the set. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Remove
FunctionThis node carries no documentation.
Remove(set: Set of T, item: T) -> Truth
bool Remove(HashSet<T> set, T item)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| item | T | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Set Equals
FunctionWhether the set and the other elements hold exactly the same elements, by the set's equality rule, ignoring order and any duplicates in Other.
SetEquals(set: Set of T, other: IEnumerable<T>) -> Truth
bool SetEquals(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to compare. |
| other | IEnumerable<T> | — | The elements to compare it with. |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Symmetric Except
FunctionThe elements in exactly one of the two operands, in a new set; both operands untouched.
SymmetricExcept -> Set of T
set: Set of T
other: IEnumerable<T>HashSet<T> SymmetricExcept(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| other | IEnumerable<T> | — |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
To Array
FunctionCopies the set's elements into a new array, for when an indexed or ordered collection is needed. The order is whatever order the set happens to hold them in, which is not guaranteed to be insertion order.
ToArray(set: Set of T) -> T Array
T[] ToArray(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to copy. |
Returns
| result | T Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
To List
FunctionCopies the set's elements into a new list, for when an indexed collection that can hold duplicates is needed. The order is whatever order the set happens to hold them in, which is not guaranteed to be insertion order.
ToList(set: Set of T) -> List of T
List<T> ToList(HashSet<T> set)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | The set to copy. |
Returns
| result | List of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library
Union
FunctionEvery element in either operand, in a new set; both operands untouched.
Union(set: Set of T, other: IEnumerable<T>) -> Set of T
HashSet<T> Union(HashSet<T> set, IEnumerable<T> other)
Parameters
| name | type | default | description |
|---|---|---|---|
| set | Set of T | — | |
| other | IEnumerable<T> | — |
Returns
| result | Set of T |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Set Routines
- Package
- Standard Library