Dune Core Modules (2.10.0)
Dune::TypeTree::HybridTreePath< T > Class Template Reference
A hybrid version of TreePath that supports both compile time and run time indices. More...
#include <dune/typetree/treepath.hh>
Public Types | |
using | index_sequence = std::index_sequence_for< T... > |
An index_sequence for the entries in this HybridTreePath . | |
Public Member Functions | |
constexpr | HybridTreePath () |
Default constructor. | |
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. | |
Static Public Member Functions | |
static constexpr index_sequence | enumerate () |
Returns an index_sequence for enumerating the components of this HybridTreePath. | |
static constexpr std::size_t | size () |
Get the size (length) of this path. | |
static constexpr std::size_t | max_size () |
Get the size (length) of this path. | |
Detailed Description
template<typename... T>
class Dune::TypeTree::HybridTreePath< 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>.
The documentation for this class was generated from the following file:
- dune/typetree/treepath.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Dec 26, 23:30, 2024)