DUNE PDELab (unstable)
multiindex.hh
138 for (typename ReservedVector<T,n>::const_iterator it = mi._mi.begin(); it != mi._mi.begin() + mi.size(); ++it)
345 MultiIndex(const TypeTree::HybridTreePath<U...>& tp) -> MultiIndex<std::common_type_t<U...>,sizeof...(U)>;
350DUNE_DEFINE_HASH(DUNE_HASH_TEMPLATE_ARGS(typename T, std::size_t n),DUNE_HASH_TYPE(Dune::PDELab::MultiIndex<T,n>))
A hybrid multi-index class that supports both compile time and run time indices.
Definition: hybridmultiindex.hh:81
static constexpr std::size_t size()
Get the size (length) of this multi-index.
Definition: hybridmultiindex.hh:122
static constexpr index_sequence enumerate()
Returns an index_sequence for enumerating the components of this HybridMultiIndex.
Definition: hybridmultiindex.hh:116
friend MultiIndex pop_front(MultiIndex mi)
Returns a copy of a multi-index without the front element.
Definition: multiindex.hh:252
friend std::ostream & operator<<(std::ostream &s, const MultiIndex &mi)
Writes a pretty representation of the MultiIndex to the given std::ostream.
Definition: multiindex.hh:287
friend reference back(MultiIndex &mi)
Returns the back element of the MultiIndex.
Definition: multiindex.hh:202
friend MultiIndex reverse(MultiIndex rv)
Reverses the order of elements in the MultiIndex.
Definition: multiindex.hh:280
friend MultiIndex accumulate_back(MultiIndex mi, const value_type &t)
Accumulates a value to the back element of the MultiIndex.
Definition: multiindex.hh:259
friend reference front(MultiIndex &mi)
Returns the front element of the MultiIndex.
Definition: multiindex.hh:192
MultiIndex(const ReservedVector< T, n > &rv)
Copy constructor from ReservedVector.
Definition: multiindex.hh:160
friend const_reference front(const MultiIndex &mi)
Returns the front element of the MultiIndex.
Definition: multiindex.hh:197
friend MultiIndex push_front(MultiIndex mi, const value_type &t)
Returns a copy of a multi-index with prepended element.
Definition: multiindex.hh:228
friend const_reference back(const MultiIndex &mi)
Returns the back element of the MultiIndex.
Definition: multiindex.hh:207
friend MultiIndex accumulate_front(MultiIndex mi, const value_type &t)
Accumulates a value to the front element of the MultiIndex.
Definition: multiindex.hh:265
storage_type::size_type size_type
An unsigned integral type.
Definition: reservedvector.hh:67
storage_type::const_reference const_reference
Const reference to T.
Definition: reservedvector.hh:65
static const std::size_t max_depth
The maximum possible depth of the MultiIndex.
Definition: multiindex.hh:38
bool operator==(const MultiIndex &r) const
Tests whether two MultiIndices are equal.
Definition: multiindex.hh:313
MultiIndex(const MultiIndex< T, _n > &rv)
Copy constructor from a multi-index of different size.
Definition: multiindex.hh:166
storage_type::value_type value_type
The type of object, T, stored in the vector.
Definition: reservedvector.hh:57
void pop_front()
Erases the last element of the vector, O(1) time.
Definition: multiindex.hh:242
friend MultiIndex join(MultiIndex head, const MultiIndex &tail)
Concatenates two MultiIndices into a new MultiIndex, up to the maximum size n.
Definition: multiindex.hh:271
friend MultiIndex push_back(MultiIndex mi, const value_type &t)
Returns a copy of a multi-index with appended element.
Definition: multiindex.hh:212
void push_front(const value_type &t)
Appends an element to the beginning of a vector, up to the maximum size n, O(n) time.
Definition: multiindex.hh:219
storage_type::reference reference
Reference to T.
Definition: reservedvector.hh:63
friend MultiIndex pop_back(MultiIndex mi)
Returns a copy of a multi-index without the back element.
Definition: multiindex.hh:235
bool operator!=(const MultiIndex &r) const
Tests whether two MultiIndices are not equal.
Definition: multiindex.hh:321
MultiIndex(const TypeTree::HybridTreePath< U... > &tp)
Copy constructor from a hybrid multi-index.
Definition: multiindex.hh:176
storage_type::pointer pointer
Pointer to T.
Definition: reservedvector.hh:59
static constexpr size_type max_size() noexcept
Returns the maximum length of the vector.
Definition: reservedvector.hh:379
constexpr iterator end() noexcept
Returns an iterator pointing to the end of the vector.
Definition: reservedvector.hh:247
constexpr size_type size() const noexcept
Returns number of elements in the vector.
Definition: reservedvector.hh:361
constexpr bool empty() const noexcept
Returns true if vector has no elements.
Definition: reservedvector.hh:367
constexpr iterator begin() noexcept
Returns a iterator pointing to the beginning of the vector.
Definition: reservedvector.hh:211
storage_type::iterator iterator
Iterator used to iterate through a vector.
Definition: reservedvector.hh:71
storage_type::difference_type difference_type
A signed integral type.
Definition: reservedvector.hh:69
constexpr void clear() noexcept
Erases all elements.
Definition: reservedvector.hh:155
storage_type::const_iterator const_iterator
Const iterator used to iterate through a vector.
Definition: reservedvector.hh:73
storage_type::size_type size_type
An unsigned integral type.
Definition: reservedvector.hh:67
storage_type::const_reference const_reference
Const reference to T.
Definition: reservedvector.hh:65
constexpr reference back() noexcept
Returns reference to last element of vector.
Definition: reservedvector.hh:331
storage_type::value_type value_type
The type of object, T, stored in the vector.
Definition: reservedvector.hh:57
constexpr reference operator[](size_type i) noexcept
Returns reference to the i'th element.
Definition: reservedvector.hh:303
constexpr reference front() noexcept
Returns reference to first element of vector.
Definition: reservedvector.hh:317
constexpr void resize(size_type s) noexcept
Specifies a new size for the vector.
Definition: reservedvector.hh:161
storage_type::reference reference
Reference to T.
Definition: reservedvector.hh:63
constexpr void forEach(Range &&range, F &&f)
Range based for loop.
Definition: hybridutilities.hh:257
constexpr auto min
Function object that returns the smaller of the given values.
Definition: hybridutilities.hh:507
constexpr EnableIfInterOperable< T1, T2, bool >::type operator<(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:638
Support for calculating hash values of objects.
#define DUNE_DEFINE_HASH(template_args, type)
Defines the required struct specialization to make type hashable via Dune::hash.
Definition: hash.hh:100
#define DUNE_HASH_TYPE(...)
Wrapper macro for the type to be hashed in DUNE_DEFINE_HASH.
Definition: hash.hh:117
#define DUNE_HASH_TEMPLATE_ARGS(...)
Wrapper macro for the template arguments in DUNE_DEFINE_HASH.
Definition: hash.hh:109
std::size_t hash_range(It first, It last)
Hashes all elements in the range [first,last) and returns the combined hash.
Definition: hash.hh:322
constexpr std::integer_sequence< T, II... > tail(std::integer_sequence< T, I0, II... >)
For a sequence [head,tail...) return the tail sequence.
Definition: integersequence.hh:58
constexpr std::integral_constant< T, I0 > head(std::integer_sequence< T, I0, II... >)
For a sequence [head,tail...) return the single head element.
Definition: integersequence.hh:53
An stl-compliant random-access container which stores everything on the stack.
Helper classes to provide indices for geometrytypes for use in a vector.
