|
dune-typetree 2.10
|
Loading...
Searching...
No Matches
treepath.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
56 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
59 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
71 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
77 [[deprecated("HybridTreePath index storage should be std::size_t or std::integral_constant<std::size_t,v>!\n"
357 [[nodiscard]] constexpr auto treePathEntry(const HybridTreePath<T...>& tp, index_constant<i> = {})
380 [[nodiscard]] constexpr std::size_t treePathIndex(const HybridTreePath<T...>& tp, index_constant<i> = {})
416 [[nodiscard]] constexpr HybridTreePath<T...,std::size_t> push_back(const HybridTreePath<T...>& tp, std::size_t i)
437 [[nodiscard]] constexpr HybridTreePath<T...,index_constant<i>> push_back(const HybridTreePath<T...>& tp, index_constant<i> i_ = {})
447 [[nodiscard]] constexpr HybridTreePath<std::size_t,T...> push_front(const HybridTreePath<T...>& tp, std::size_t element)
468 [[nodiscard]] constexpr HybridTreePath<index_constant<i>,T...> push_front(const HybridTreePath<T...>& tp, index_constant<i> _i = {})
670 struct TreePathPopBack<HybridTreePath<index_constant<j>,index_constant<k>,index_constant<l>...>,i...>
681 struct TreePathConcat<HybridTreePath<index_constant<i>...>,HybridTreePath<index_constant<k>...> >
constexpr HybridTreePath< T..., std::size_t > push_back(const HybridTreePath< T... > &tp, std::size_t i)
Appends a run time index to a HybridTreePath.
Definition treepath.hh:416
std::ostream & operator<<(std::ostream &os, const HybridTreePath< T... > &tp)
Dumps a HybridTreePath to a stream.
Definition treepath.hh:715
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:334
constexpr auto back(const HybridTreePath< T... > &tp) -> decltype(tp.back())
Returns a copy of the last element of the HybridTreePath.
Definition treepath.hh:392
constexpr HybridTreePath< std::size_t, T... > push_front(const HybridTreePath< T... > &tp, std::size_t element)
Prepends a run time index to a HybridTreePath.
Definition treepath.hh:447
constexpr auto accumulate_front(const HybridTreePath< T... > &tp, I i)
Hybrid utility that accumulates to the front of a multi-index.
Definition treepath.hh:505
constexpr auto reverse(const HybridTreePath< T... > &tp)
Reverses the order of the elements in the path.
Definition treepath.hh:518
constexpr auto accumulate_back(const HybridTreePath< T... > &tp, I i)
Hybrid utility that accumulates to the back of a multi-index.
Definition treepath.hh:486
constexpr auto join(const HybridTreePath< Head... > &head, const Other &... tail)
Join two tree paths into one.
Definition treepath.hh:512
constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< i >={}) -> typename std::decay< decltype(std::get< i >(tp._data))>::type
Returns a copy of the i-th element of the HybridTreePath.
Definition treepath.hh:357
constexpr auto pop_back(const HybridTreePath< T... > &tp)
Removes last index on a HybridTreePath.
Definition treepath.hh:542
constexpr auto operator!=(const HybridTreePath< S... > &lhs, const HybridTreePath< T... > &rhs)
Compare two HybridTreePaths for unequality.
Definition treepath.hh:593
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:312
constexpr std::size_t treePathIndex(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns the index value of the i-th element of the HybridTreePath.
Definition treepath.hh:380
constexpr auto makeTreePath(const T... t)
helper function to construct a new HybridTreePath from the given indices.
Definition treepath.hh:295
constexpr bool operator==(const HybridTreePath< S... > &lhs, const HybridTreePath< T... > &rhs)
Compare two HybridTreePaths for value equality.
Definition treepath.hh:559
constexpr auto treePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:326
constexpr auto front(const HybridTreePath< T... > &tp) -> decltype(tp.front())
Returns a copy of the first element of the HybridTreePath.
Definition treepath.hh:405
STL namespace.
decltype(auto) constexpr unpackIntegerSequence(F &&f, std::integer_sequence< I, i... > sequence)
int size() const
void pop_front()
constexpr void forEach(Range &&range, F &&f)
constexpr std::integer_sequence< T, II... > tail(std::integer_sequence< T, I0, II... >)
constexpr std::integral_constant< T, I0 > head(std::integer_sequence< T, I0, II... >)
Statically combine two values of type result_type using +.
Definition accumulate_static.hh:49
A hybrid version of TreePath that supports both compile time and run time indices.
Definition treepath.hh:158
constexpr HybridTreePath(HybridTreePath &&tp)=default
constexpr auto back() const
Get the last index value. Only available in non-empty paths.
Definition treepath.hh:270
constexpr HybridTreePath & operator=(const HybridTreePath &tp)=default
constexpr std::size_t element(std::size_t pos) const
Get the index value at position pos.
Definition treepath.hh:249
constexpr HybridTreePath(std::tuple< T... > t)
Constructor from a std::tuple
Definition treepath.hh:186
constexpr HybridTreePath & operator=(HybridTreePath &&tp)=default
constexpr HybridTreePath(U... t)
Constructor from arguments.
Definition treepath.hh:196
constexpr HybridTreePath()
Default constructor.
Definition treepath.hh:173
constexpr auto element(Dune::index_constant< i > pos={}) const
Get the last index value.
Definition treepath.hh:243
static constexpr std::size_t size()
Get the size (length) of this path.
Definition treepath.hh:210
constexpr auto operator[](Dune::index_constant< i >) const
Get the index value at position pos.
Definition treepath.hh:224
constexpr auto front() const
Get the first index value. Only available in non-empty paths.
Definition treepath.hh:262
static constexpr index_sequence enumerate()
Returns an index_sequence for enumerating the components of this HybridTreePath.
Definition treepath.hh:204
constexpr HybridTreePath(const HybridTreePath &tp)=default
constexpr std::size_t operator[](std::size_t pos) const
Get the index value at position pos.
Definition treepath.hh:230
static constexpr std::size_t max_size()
Get the size (length) of this path.
Definition treepath.hh:216
Definition treepath.hh:110
Definition treepath.hh:113
Definition treepath.hh:116
Definition treepath.hh:119
Definition treepath.hh:122
Definition treepath.hh:125
Definition treepath.hh:128
Definition treepath.hh:131
HybridTreePath< index_constant< i >..., index_constant< k > > type
Definition treepath.hh:636
HybridTreePath< index_constant< k >, index_constant< i >... > type
Definition treepath.hh:642
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:663
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:677
HybridTreePath< index_constant< i >..., index_constant< k >... > type
Definition treepath.hh:683
T make_tuple(T... args)
T reduce(T... args)
T tuple_cat(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8