|
dune-typetree 2.10
|
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 (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. | |
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
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 PowerNodes, 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>.
Member Typedef Documentation
◆ index_sequence
| using Dune::TypeTree::HybridTreePath< T >::index_sequence = std::index_sequence_for<T...> |
An index_sequence for the entries in this HybridTreePath.
Constructor & Destructor Documentation
◆ HybridTreePath() [1/5]
|
inlineconstexpr |
Default constructor.
◆ HybridTreePath() [2/5]
|
constexprdefault |
◆ HybridTreePath() [3/5]
|
constexprdefault |
◆ HybridTreePath() [4/5]
|
inlineexplicitconstexpr |
Constructor from a std::tuple
◆ HybridTreePath() [5/5]
|
inlineexplicitconstexpr |
Constructor from arguments.
Member Function Documentation
◆ back()
|
inlineconstexpr |
Get the last index value. Only available in non-empty paths.
◆ element() [1/2]
|
inlineconstexpr |
Get the last index value.
◆ element() [2/2]
|
inlineconstexpr |
Get the index value at position pos.
◆ enumerate()
|
inlinestaticconstexpr |
Returns an index_sequence for enumerating the components of this HybridTreePath.
◆ front()
|
inlineconstexpr |
Get the first index value. Only available in non-empty paths.
◆ max_size()
|
inlinestaticconstexpr |
Get the size (length) of this path.
◆ operator=() [1/2]
|
constexprdefault |
◆ operator=() [2/2]
|
constexprdefault |
◆ operator[]() [1/2]
|
inlineconstexpr |
Get the index value at position pos.
◆ operator[]() [2/2]
|
inlineconstexpr |
Get the index value at position pos.
◆ size()
|
inlinestaticconstexpr |
Get the size (length) of this path.
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8