3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH
4#define DUNE_GRID_UTILITY_MULTIINDEX_HH
15 namespace FactoryUtilities
17 template<std::
size_t dim>
21 std::array<unsigned int,dim> limits_;
25 MultiIndex(
const std::array<unsigned int,dim>& limits) : limits_(limits)
27 std::fill(this->begin(), this->end(), 0);
33 for (std::size_t i=0; i<dim; i++)
39 if ((*
this)[i]<limits_[i])
51 for (std::size_t i=0; i<dim; i++)
Include standard header files.
Definition: agrid.hh:60
Definition: multiindex.hh:19
MultiIndex(const std::array< unsigned int, dim > &limits)
Constructor with a given range for each digit.
Definition: multiindex.hh:25
MultiIndex< dim > & operator++()
Increment the MultiIndex.
Definition: multiindex.hh:31
size_t cycle() const
Compute how many times you can call operator++ before getting to (0,...,0) again.
Definition: multiindex.hh:48