16 #ifndef dealii_table_indices_h 17 #define dealii_table_indices_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 29 DEAL_II_NAMESPACE_OPEN
48 "TableIndices objects need to represent at least one index.");
74 TableIndices(
const std::size_t index0,
const std::size_t index1);
85 const std::size_t index1,
86 const std::size_t index2);
97 const std::size_t index1,
98 const std::size_t index2,
99 const std::size_t index3);
110 const std::size_t index1,
111 const std::size_t index2,
112 const std::size_t index3,
113 const std::size_t index4);
131 const std::size_t index1,
132 const std::size_t index2,
133 const std::size_t index3,
134 const std::size_t index4,
135 const std::size_t index5,
143 std::size_t
operator[](
const unsigned int i)
const;
148 std::size_t &
operator[](
const unsigned int i);
173 template <
class Archive>
175 serialize(Archive &ar,
const unsigned int version);
192 for (
unsigned int i = 0; i < N; ++i)
202 N == 1,
"This constructor is only available for TableIndices<1> objects.");
210 const std::size_t index1)
213 N == 2,
"This constructor is only available for TableIndices<2> objects.");
222 const std::size_t index1,
223 const std::size_t index2)
226 N == 3,
"This constructor is only available for TableIndices<3> objects.");
236 const std::size_t index1,
237 const std::size_t index2,
238 const std::size_t index3)
241 N == 4,
"This constructor is only available for TableIndices<4> objects.");
252 const std::size_t index1,
253 const std::size_t index2,
254 const std::size_t index3,
255 const std::size_t index4)
258 N == 5,
"This constructor is only available for TableIndices<5> objects.");
270 const std::size_t index1,
271 const std::size_t index2,
272 const std::size_t index3,
273 const std::size_t index4,
274 const std::size_t index5,
275 const std::size_t index6,
276 const std::size_t index7,
277 const std::size_t index8)
283 ExcMessage(
"more than N index values provided"));
287 ExcMessage(
"more than N index values provided"));
291 ExcMessage(
"more than N index values provided"));
295 ExcMessage(
"more than N index values provided"));
299 ExcMessage(
"more than N index values provided"));
303 ExcMessage(
"more than N index values provided"));
307 ExcMessage(
"more than N index values provided"));
311 ExcMessage(
"more than N index values provided"));
323 for (
unsigned int i = 0; i < N; ++i)
327 indices[8 % N] = index8;
330 indices[7 % N] = index7;
333 indices[6 % N] = index6;
336 indices[5 % N] = index5;
339 indices[4 % N] = index4;
342 indices[3 % N] = index3;
345 indices[2 % N] = index2;
348 indices[1 % N] = index1;
351 indices[0 % N] = index0;
376 for (
unsigned int i = 0; i < N; ++i)
377 if (indices[i] != other.
indices[i])
387 return !(*
this == other);
395 std::sort(std::begin(indices), std::end(indices));
400 template <
class Archive>
416 operator<<(std::ostream &out, const TableIndices<N> &indices)
419 for (
unsigned int i = 0; i < N; ++i)
431 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
std::size_t operator[](const unsigned int i) const
#define AssertIndexRange(index, range)
void serialize(Archive &ar, const unsigned int version)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
bool operator==(const TableIndices< N > &other) const
bool operator!=(const TableIndices< N > &other) const