|
PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Fixed-size brute-force set implementation. More...
#include <BruteSet.h>
Public Member Functions | |
| BruteSet () | |
| Construct a new BruteSet object. | |
| T * | begin () |
| Begin iterator. | |
| T * | end () |
| End iterator. | |
| T const * | begin () const |
| Const begin iterator. | |
| T const * | end () const |
| Const end iterator. | |
| bool | Insert (T const &value) |
| Insert an element into the set. | |
| bool | Contains (T const &value) const |
| Check if the set contains an element. | |
| bool | Remove (T const &value) |
| Remove an element from the set. | |
| int | Size () const |
| Get the size of the set. | |
| bool | IsFull () const |
| Check if the set is full. | |
| bool | IsEmpty () const |
| Check if the set is empty. | |
| void | Clear () |
| Clear the set. | |
Fixed-size brute-force set implementation.
| T | Type of the elements in the set |
| kCapacity | Maximum number of elements in the set |
This set is suitable for small sets where the maximum number of elements is known at compile time. It uses a simple array to store the elements and provides basic operations such as insertion, removal, and membership testing.
|
inline |
Begin iterator.
|
inline |
Const begin iterator.
|
inline |
Clear the set.
Removes all elements from the set, resetting its size to zero.
|
inline |
Check if the set contains an element.
| value | Element to check |
|
inline |
End iterator.
|
inline |
Const end iterator.
|
inline |
Insert an element into the set.
| value | Element to insert |
|
inline |
Check if the set is empty.
|
inline |
Check if the set is full.
|
inline |
Remove an element from the set.
| value | Element to remove |
|
inline |
Get the size of the set.