A hybrid version of TreePath that supports both compile time and run time indices.
More...
|
constexpr | HybridTreePath () |
| Default constructor.
|
|
constexpr | HybridTreePath (const HybridTreePath &tp)=default |
|
constexpr | HybridTreePath (HybridTreePath &&tp)=default |
|
constexpr HybridTreePath & | operator= (const HybridTreePath &tp)=default |
|
constexpr HybridTreePath & | operator= (HybridTreePath &&tp)=default |
|
constexpr | HybridTreePath (std::tuple< T... > t) |
| Constructor from a std::tuple
|
|
template<typename... U, typename std::enable_if_t<(sizeof...(T) > 0 &&sizeof...(U)==sizeof...(T)), bool > = true> |
constexpr | HybridTreePath (U... t) |
| Constructor from arguments.
|
|
template<std::size_t i, std::enable_if_t<(sizeof...(T) > i), bool > = true> |
constexpr auto | operator[] (Dune::index_constant< i >) const |
| Get the index value at position pos.
|
|
constexpr std::size_t | operator[] (std::size_t pos) const |
| Get the index value at position pos.
|
|
template<std::size_t i, std::enable_if_t<(sizeof...(T) > i), bool > = true> |
constexpr auto | element (Dune::index_constant< i > pos={}) const |
| Get the last index value.
|
|
constexpr std::size_t | element (std::size_t pos) const |
| Get the index value at position pos.
|
|
template<std::size_t n = sizeof...(T), std::enable_if_t<(n > 0 &&n==sizeof...(T)), bool > = true> |
constexpr auto | front () const |
| Get the first index value. Only available in non-empty paths.
|
|
template<std::size_t n = sizeof...(T), std::enable_if_t<(n > 0 &&n==sizeof...(T)), bool > = true> |
constexpr auto | back () const |
| Get the last index value. Only available in non-empty paths.
|
|
template<typename... T>
class Dune::TypeTree::HybridTreePath< T >
A hybrid version of TreePath that supports both compile time and run time indices.
A HybridTreePath
supports storing a combination of run time and compile time indices. This makes it possible to store the tree path to a tree node inside the tree node itself, even if the path contains one or more PowerNode
s, where each child must have exactly the same type. At the same time, as much information as possible is kept accessible at compile time, allowing for more efficient algorithms.
- Note
- Internally all indices are stored as std::size_t or std::integral_constant<std::size_t,v>. The latter is the same as Dune::index_constant<v>.