dune-common  2.11
Classes | Namespaces | Functions | Variables
hybridmultiindex.hh File Reference
#include <cstddef>
#include <cassert>
#include <iostream>
#include <type_traits>
#include <dune/common/typetraits.hh>
#include <dune/common/indices.hh>
#include <dune/common/hybridutilities.hh>

Go to the source code of this file.

Classes

class  Dune::HybridMultiIndex< T >
 A hybrid multi-index class that supports both compile time and run time indices. More...
 
struct  std::tuple_size< Dune::HybridMultiIndex< T... > >
 
struct  std::tuple_element< i, Dune::HybridMultiIndex< T... > >
 

Namespaces

 Dune
 Dune namespace
 

Functions

template<typename... I>
 Dune::requires (((std::is_integral_v< I > or Dune::IsIntegralConstant< I >::value) &&...)) HybridMultiIndex(I... i) -> HybridMultiIndex< decltype(Impl::castToHybridSizeT(i))... >
 
template<typename... I>
 Dune::HybridMultiIndex (std::tuple< I... >) -> HybridMultiIndex< I... >
 
template<typename... T>
constexpr auto Dune::back (const HybridMultiIndex< T... > &tp) -> decltype(tp.back())
 Returns a copy of the last element of the HybridMultiIndex. More...
 
template<typename... T>
constexpr auto Dune::front (const HybridMultiIndex< T... > &tp) -> decltype(tp.front())
 Returns a copy of the first element of the HybridMultiIndex. More...
 
template<typename... T>
constexpr HybridMultiIndex< T..., std::size_t > Dune::push_back (const HybridMultiIndex< T... > &tp, std::size_t i)
 Appends a run time index to a HybridMultiIndex. More...
 
template<std::size_t i, typename... T>
constexpr HybridMultiIndex< T..., index_constant< i > > Dune::push_back (const HybridMultiIndex< T... > &tp, index_constant< i > iConstant={})
 Appends a compile time index to a HybridMultiIndex. More...
 
template<typename... T>
constexpr HybridMultiIndex< std::size_t, T... > Dune::push_front (const HybridMultiIndex< T... > &tp, std::size_t i)
 Prepends a run time index to a HybridMultiIndex. More...
 
template<std::size_t i, typename... T>
constexpr HybridMultiIndex< index_constant< i >, T... > Dune::push_front (const HybridMultiIndex< T... > &tp, index_constant< i > iConstant={})
 Prepends a compile time index to a HybridMultiIndex. More...
 
template<typename I , typename... T>
 Dune::requires (sizeof...(T) > 0) const expr auto accumulate_back(const HybridMultiIndex< T... > &tp
 Hybrid utility that accumulates to the back of a multi-index. More...
 
return Dune::push_back (pop_back(tp), plus(back(tp), i))
 
return Dune::push_front (pop_front(tp), plus(front(tp), i))
 
template<class... Head, class... Other>
constexpr auto Dune::join (const HybridMultiIndex< Head... > &head, const Other &... tail)
 Join two hybrid multi-indices into one. More...
 
template<class... T>
constexpr auto Dune::reverse (const HybridMultiIndex< T... > &tp)
 Reverses the order of the elements in the multi-index. More...
 
template<class... T>
 Dune::requires (sizeof...(T) > 0) const expr auto pop_front(const HybridMultiIndex< T... > &tp)
 Removes first index on a HybridMultiIndex. More...
 
template<class... S, class... T>
constexpr bool Dune::operator== (const HybridMultiIndex< S... > &lhs, const HybridMultiIndex< T... > &rhs)
 Compare two HybridMultiIndexs for value equality. More...
 
template<class S , S... lhs, class T , T... rhs>
constexpr auto Dune::operator== (const HybridMultiIndex< std::integral_constant< S, lhs >... > &, const HybridMultiIndex< std::integral_constant< T, rhs >... > &)
 Overload for purely static HybridMultiIndexs. More...
 
template<class... S, class... T>
constexpr auto Dune::operator!= (const HybridMultiIndex< S... > &lhs, const HybridMultiIndex< T... > &rhs)
 Compare two HybridMultiIndexs for inequality. More...
 
template<class S , S... lhs, class T , T... rhs>
constexpr auto Dune::operator!= (const HybridMultiIndex< std::integral_constant< S, lhs >... > &, const HybridMultiIndex< std::integral_constant< T, rhs >... > &)
 Compare two static HybridMultiIndexs for inequality. More...
 
template<typename... T>
std::ostream & Dune::operator<< (std::ostream &os, const HybridMultiIndex< T... > &tp)
 Dumps a HybridMultiIndex to a stream. More...
 

Variables

Dune::i