3 #ifndef DUNE_FUNCTIONS_COMMON_MULTIINDEX_HH
4 #define DUNE_FUNCTIONS_COMMON_MULTIINDEX_HH
10 #include <dune/common/hash.hh>
13 namespace Dune::Functions {
22 template<
class size_type, std::
size_t n>
24 public std::array<size_type, n>
27 static constexpr std::size_t size() {
return n; }
28 static constexpr std::size_t max_size() {
return n; }
31 return hash_range(v.begin(), v.end());
47 template<
class size_type>
49 public std::array<size_type, 1>
53 static constexpr std::size_t size() {
return 1; }
54 static constexpr std::size_t max_size() {
return 1; }
57 operator const size_type& ()
const {
62 return hash_range(v.begin(), v.end());
65 operator size_type& () {
73 template<
typename Stream,
class size_type, std::
size_t n>
75 for (
const auto& ci : c)
84 template<
class size_type, std::
size_t n>
85 struct std::tuple_size<
Dune::Functions::StaticMultiIndex<size_type,n> >
86 : std::integral_constant<std::size_t, n> { };
A statically sized MultiIndex type.
Definition: multiindex.hh:25
Definition: polynomial.hh:13