11#ifndef PBAT_COMMON_BRUTESET_H
12#define PBAT_COMMON_BRUTESET_H
27template <
class T, auto kCapacity = 32>
44 T*
end() {
return set + size; }
49 T
const*
begin()
const {
return set; }
54 T
const*
end()
const {
return set + size; }
64 assert(size < kCapacity);
79 for (
int i = 0; i < size; ++i)
91 for (
int i = 0; i < size; ++i)
105 int Size()
const {
return size; }
110 bool IsFull()
const {
return size == kCapacity; }
void Clear()
Clear the set.
Definition BruteSet.h:120
bool Insert(T const &value)
Insert an element into the set.
Definition BruteSet.h:62
T const * begin() const
Const begin iterator.
Definition BruteSet.h:49
T const * end() const
Const end iterator.
Definition BruteSet.h:54
bool IsEmpty() const
Check if the set is empty.
Definition BruteSet.h:115
bool IsFull() const
Check if the set is full.
Definition BruteSet.h:110
BruteSet()
Construct a new BruteSet object.
Definition BruteSet.h:34
T * end()
End iterator.
Definition BruteSet.h:44
bool Remove(T const &value)
Remove an element from the set.
Definition BruteSet.h:89
T * begin()
Begin iterator.
Definition BruteSet.h:39
int Size() const
Get the size of the set.
Definition BruteSet.h:105
bool Contains(T const &value) const
Check if the set contains an element.
Definition BruteSet.h:77
Common functionality.
Definition ArgSort.h:20