Dune Core Modules (2.9.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<(sizeof...(T) > 0 &&sizeof...(U)==sizeof...(T)), bool >::type = true>
constexpr HybridTreePath (U... t)
 Constructor from arguments.
 
template<std::size_t i>
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>
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.
 
auto back () const
 Get the last index value.
 

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.
 

Detailed Description

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 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.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jun 16, 22:32, 2024)