16 #ifndef dealii_table_indices_h 17 #define dealii_table_indices_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 28 DEAL_II_NAMESPACE_OPEN
47 "TableIndices objects need to represent at least one index.");
74 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);
170 template <
class Archive>
171 void serialize (Archive &ar,
const unsigned int version);
188 for (
unsigned int i=0; i<N; ++i)
198 "This constructor is only available for TableIndices<1> objects.");
206 const std::size_t index1)
209 "This constructor is only available for TableIndices<2> objects.");
218 const std::size_t index1,
219 const std::size_t index2)
222 "This constructor is only available for TableIndices<3> objects.");
232 const std::size_t index1,
233 const std::size_t index2,
234 const std::size_t index3)
237 "This constructor is only available for TableIndices<4> objects.");
248 const std::size_t index1,
249 const std::size_t index2,
250 const std::size_t index3,
251 const std::size_t index4)
254 "This constructor is only available for TableIndices<5> objects.");
266 const std::size_t index1,
267 const std::size_t index2,
268 const std::size_t index3,
269 const std::size_t index4,
270 const std::size_t index5,
271 const std::size_t index6,
272 const std::size_t index7,
273 const std::size_t index8)
312 for (
unsigned int i=0; i<N; ++i)
316 indices[8 % N] = index8;
319 indices[7 % N] = index7;
322 indices[6 % N] = index6;
325 indices[5 % N] = index5;
328 indices[4 % N] = index4;
331 indices[3 % N] = index3;
334 indices[2 % N] = index2;
337 indices[1 % N] = index1;
340 indices[0 % N] = index0;
371 for (
unsigned int i=0; i<N; ++i)
372 if (indices[i] != other.
indices[i])
383 return !(*
this == other);
392 std::sort(std::begin(indices), std::end(indices));
397 template <
class Archive>
418 for (
unsigned int i=0; i<N; ++i)
430 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)
OutputOperator< VectorType > & operator<<(OutputOperator< VectorType > &out, unsigned int step)
bool operator==(const TableIndices< N > &other) const
bool operator!=(const TableIndices< N > &other) const