7 return colors_.test(index.
index());
12 colors_.set(index.
index(), value);
17 colors_.reset(index.
index());
25 if (union_bits.test(i)) {
37 if (intersection_bits.test(i)) {
46 return set.
colors().count();
55 return intersection == a.
colors();
Represents a color index value for palette operations.
std::size_t index() const
A set of colors represented as a bitset.
const std::bitset< num_colors > & colors() const
void reset(ColorIndex index)
void set(ColorIndex index, bool value=true)
bool test(ColorIndex index) const
bool is_subset(const ColorSet &a, const ColorSet &b)
Checks if one ColorSet is a subset of another.
ColorSet color_set_union(const ColorSet &a, const ColorSet &b)
Computes the union of two ColorSets.
constexpr std::size_t num_colors
Maximum allowable color count for GBA hardware.
ColorSet color_set_intersection(const ColorSet &a, const ColorSet &b)
Computes the intersection of two ColorSets.
std::size_t intersection_size(const ColorSet &a, const ColorSet &b)
Computes the intersection size between two ColorSets.
std::size_t color_set_count(const ColorSet &set)
Counts the number of colors in a ColorSet.
std::size_t union_size(const ColorSet &a, const ColorSet &b)
Computes the union size of two ColorSets.