3 #ifndef DUNE_ENUMSET_HH
4 #define DUNE_ENUMSET_HH
57 template<
typename TA,
int item>
76 template<
typename TA,
int from,
int end>
96 typedef typename S::Type
Type;
100 return !S::contains(item);
107 template<
class TI1,
class TI2,
typename TA=
typename TI1::Type>
111 static bool contains(
const TA& item);
114 template<
typename TA>
120 template<
typename TA>
126 template<
typename TA,
int i>
132 template<
typename TA,
int i>
138 template<
typename TA,
int from,
int to>
141 return from<=item && item<=to;
144 template<
typename TA,
int from,
int to>
147 return os<<
"["<<from<<
" - "<<to<<
"]";
150 template<
class TI1,
class TI2,
typename TA>
153 return TI1::contains(item) ||
157 template<
class TI1,
class TI2>
159 [[maybe_unused]]
const TI2& set2)
164 template<
class TI1,
class TI2,
class T>
167 return os << TI1()<<
" "<<TI2();
static bool contains(const Type &attribute)
Always returns true.
Definition: enumset.hh:121
Combine< TI1, TI2, typename TI1::Type > combine([[maybe_unused]] const TI1 &set1, [[maybe_unused]] const TI2 &set2)
Definition: enumset.hh:158
static bool contains(const Type &item)
Definition: enumset.hh:139
static bool contains(const TA &item)
Definition: enumset.hh:151
static bool contains(const Type &attribute)
Always returns false.
Definition: enumset.hh:115
static bool contains(const Type &attribute)
Tests whether an item is in the set.
Definition: enumset.hh:127
std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
Definition: bigunsignedint.hh:273
Dune namespace.
Definition: alignedallocator.hh:11
An empty set.
Definition: enumset.hh:25
TA Type
The POD type the set holds.
Definition: enumset.hh:30
A set containing everything.
Definition: enumset.hh:42
TA Type
The POD type the set holds.
Definition: enumset.hh:47
A set consisting only of one item.
Definition: enumset.hh:59
TA Type
The type the set holds.
Definition: enumset.hh:64
A set representing a range including the borders.
Definition: enumset.hh:78
TA Type
The type the set holds.
Definition: enumset.hh:83
The negation of a set. An item is contained in the set if and only if it is not contained in the nega...
Definition: enumset.hh:94
S::Type Type
Definition: enumset.hh:96
static bool contains(const Type &item)
Definition: enumset.hh:98
A set combining two other sets.
Definition: enumset.hh:109