|
AngouriMath
|
Use this class for solvers and other places when a set needs to be built and you want to avoid using lists. More...
Public Member Functions | |
| FiniteSetBuilder () | |
| Creates an instance of FiniteSetBuilder with no elements. More... | |
| FiniteSetBuilder (IEnumerable< Entity > elements) | |
| Creates an instance of FiniteSetBuilder with elements, provided in the argument. More... | |
| void | Add (Entity element) |
| It does not check for uniqueness of elements, however, it will be performed automatically once you will call the ToFiniteSet method. More... | |
| void | Remove (Entity element) |
| Removes a given element from the builder More... | |
| FiniteSet | ToFiniteSet () |
| Build itself into a FiniteSet entity. More... | |
Public Attributes | |
| bool | IsEmpty => raw.Count == 0 |
| Checks whether the number of elements added to the builder is zero More... | |
Use this class for solvers and other places when a set needs to be built and you want to avoid using lists.
It builds an instance of FiniteSet.
|
inline |
Creates an instance of FiniteSetBuilder with no elements.
|
inline |
Creates an instance of FiniteSetBuilder with elements, provided in the argument.
It does not check for uniqueness of elements, however, it will be performed automatically once you will call the ToFiniteSet method.
| void AngouriMath.Core.FiniteSetBuilder.Add | ( | Entity | element | ) |
It does not check for uniqueness of elements, however, it will be performed automatically once you will call the ToFiniteSet method.
| void AngouriMath.Core.FiniteSetBuilder.Remove | ( | Entity | element | ) |
Removes a given element from the builder
| element | The element to remove. If no such element was found, method silently exits. |
| FiniteSet AngouriMath.Core.FiniteSetBuilder.ToFiniteSet | ( | ) |
Build itself into a FiniteSet entity.
This method can be called multiple times throughout its lifetime.
| bool AngouriMath.Core.FiniteSetBuilder.IsEmpty => raw.Count == 0 |
Checks whether the number of elements added to the builder is zero
1.8.13