DUNE PDELab (unstable)
A class for representing multi-indices. More...
#include <dune/pdelab/common/multiindex.hh>
Public Types | |
| typedef storage_type::size_type | size_type |
| An unsigned integral type. | |
| typedef storage_type::value_type | value_type |
| The type of object, T, stored in the vector. More... | |
| typedef storage_type::reference | reference |
| Reference to T. | |
| typedef storage_type::const_reference | const_reference |
| Const reference to T. | |
| typedef storage_type::pointer | pointer |
| Pointer to T. | |
| typedef storage_type::const_pointer | const_pointer |
| Const pointer to T. | |
| typedef storage_type::difference_type | difference_type |
| A signed integral type. | |
| typedef storage_type::iterator | iterator |
| Iterator used to iterate through a vector. | |
| typedef storage_type::const_iterator | const_iterator |
| Const iterator used to iterate through a vector. | |
| typedef std::reverse_iterator< iterator > | reverse_iterator |
| Reverse iterator. | |
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
| Const reverse iterator. | |
Public Member Functions | |
| MultiIndex (const ReservedVector< T, n > &rv) | |
| Copy constructor from ReservedVector. | |
|
template<std::size_t _n> requires (n != _n) | |
| MultiIndex (const MultiIndex< T, _n > &rv) | |
| Copy constructor from a multi-index of different size. | |
| template<class... U> | |
| MultiIndex (const TypeTree::HybridTreePath< U... > &tp) | |
| Copy constructor from a hybrid multi-index. | |
| 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. | |
| void | pop_front () |
| Erases the last element of the vector, O(1) time. | |
| bool | operator== (const MultiIndex &r) const |
| Tests whether two MultiIndices are equal. More... | |
| bool | operator!= (const MultiIndex &r) const |
| Tests whether two MultiIndices are not equal. | |
| constexpr bool | operator== (const ReservedVector &that) const noexcept |
Compares the values in the vector this with that for equality. More... | |
| constexpr auto | operator<=> (const ReservedVector &that) const noexcept |
Lexicographically compares the values in the vector this with that | |
| constexpr void | clear () noexcept |
| Erases all elements. More... | |
| constexpr void | resize (size_type s) noexcept |
| Specifies a new size for the vector. | |
| constexpr void | push_back (const value_type &t) noexcept(std::is_nothrow_copy_assignable_v< value_type >) |
| Appends an element to the end of a vector, up to the maximum size n, O(1) time. | |
| constexpr void | push_back (value_type &&t) noexcept(std::is_nothrow_move_assignable_v< value_type >) |
| Appends an element to the end of a vector by moving the value, up to the maximum size n, O(1) time. | |
| template<class... Args> | |
| reference | emplace_back (Args &&... args) noexcept(std::is_nothrow_constructible_v< value_type, decltype(args)... >) |
| Appends an element to the end of a vector by constructing it in place. | |
| constexpr void | pop_back () noexcept |
| Erases the last element of the vector, O(1) time. | |
| constexpr iterator | begin () noexcept |
| Returns a iterator pointing to the beginning of the vector. More... | |
| constexpr const_iterator | begin () const noexcept |
| Returns a const_iterator pointing to the beginning of the vector. | |
| constexpr const_iterator | cbegin () const noexcept |
| Returns a const_iterator pointing to the beginning of the vector. | |
| constexpr reverse_iterator | rbegin () noexcept |
| Returns a const reverse-iterator pointing to the end of the vector. | |
| constexpr const_reverse_iterator | rbegin () const noexcept |
| Returns a const reverse-iterator pointing to the end of the vector. | |
| constexpr const_reverse_iterator | crbegin () const noexcept |
| Returns a const reverse-iterator pointing to the end of the vector. | |
| constexpr iterator | end () noexcept |
| Returns an iterator pointing to the end of the vector. | |
| constexpr const_iterator | end () const noexcept |
| Returns a const_iterator pointing to the end of the vector. | |
| constexpr const_iterator | cend () const noexcept |
| Returns a const_iterator pointing to the end of the vector. | |
| constexpr reverse_iterator | rend () noexcept |
| Returns a const reverse-iterator pointing to the begin of the vector. | |
| constexpr const_reverse_iterator | rend () const noexcept |
| Returns a const reverse-iterator pointing to the begin of the vector. | |
| constexpr const_reverse_iterator | crend () const noexcept |
| Returns a const reverse-iterator pointing to the begin of the vector. | |
| constexpr reference | at (size_type i) |
| Returns reference to the i'th element. More... | |
| constexpr const_reference | at (size_type i) const |
| Returns a const reference to the i'th element. | |
| constexpr reference | operator[] (size_type i) noexcept |
| Returns reference to the i'th element. | |
| constexpr const_reference | operator[] (size_type i) const noexcept |
| Returns a const reference to the i'th element. | |
| constexpr reference | front () noexcept |
| Returns reference to first element of vector. | |
| constexpr const_reference | front () const noexcept |
| Returns const reference to first element of vector. | |
| constexpr reference | back () noexcept |
| Returns reference to last element of vector. | |
| constexpr const_reference | back () const noexcept |
| Returns const reference to last element of vector. | |
| constexpr pointer | data () noexcept |
| Returns pointer to the underlying memory. | |
| constexpr const_pointer | data () const noexcept |
| Returns const pointer to the underlying memory. | |
| constexpr void | fill (const value_type &value) noexcept(std::is_nothrow_copy_assignable_v< value_type >) |
| Fill the container with the value. More... | |
| void | swap (ReservedVector &other) noexcept(std::is_nothrow_swappable_v< value_type >) |
| Swap the content with another vector. | |
Static Public Attributes | |
| static const std::size_t | max_depth = n |
| The maximum possible depth of the MultiIndex. | |
Friends | |
| reference | front (MultiIndex &mi) |
| Returns the front element of the MultiIndex. | |
| const_reference | front (const MultiIndex &mi) |
| Returns the front element of the MultiIndex. | |
| reference | back (MultiIndex &mi) |
| Returns the back element of the MultiIndex. | |
| const_reference | back (const MultiIndex &mi) |
| Returns the back element of the MultiIndex. | |
| MultiIndex | push_back (MultiIndex mi, const value_type &t) |
| Returns a copy of a multi-index with appended element. | |
| MultiIndex | push_front (MultiIndex mi, const value_type &t) |
| Returns a copy of a multi-index with prepended element. | |
| MultiIndex | pop_back (MultiIndex mi) |
| Returns a copy of a multi-index without the back element. | |
| MultiIndex | pop_front (MultiIndex mi) |
| Returns a copy of a multi-index without the front element. | |
| MultiIndex | accumulate_back (MultiIndex mi, const value_type &t) |
| Accumulates a value to the back element of the MultiIndex. | |
| MultiIndex | accumulate_front (MultiIndex mi, const value_type &t) |
| Accumulates a value to the front element of the MultiIndex. | |
| MultiIndex | join (MultiIndex head, const MultiIndex &tail) |
| Concatenates two MultiIndices into a new MultiIndex, up to the maximum size n. | |
| MultiIndex | reverse (MultiIndex rv) |
| Reverses the order of elements in the MultiIndex. | |
| std::ostream & | operator<< (std::ostream &s, const MultiIndex &mi) |
| Writes a pretty representation of the MultiIndex to the given std::ostream. | |
| constexpr size_type | size () const noexcept |
| Returns number of elements in the vector. More... | |
| constexpr bool | empty () const noexcept |
| Returns true if vector has no elements. | |
| static constexpr size_type | capacity () noexcept |
| Returns current capacity (allocated memory) of the vector. | |
| static constexpr size_type | max_size () noexcept |
| Returns the maximum length of the vector. | |
Detailed Description
class Dune::PDELab::MultiIndex< T, n >
A class for representing multi-indices.
A MultiIndex represents an ordered tuple of indices.
- Template Parameters
-
T the type of the index entries. n the maximum number of indices in the MultiIndex.
Member Typedef Documentation
◆ value_type
| typedef storage_type::value_type Dune::ReservedVector< T, n >::value_type |
The type of object, T, stored in the vector.
Typedefs
Member Function Documentation
◆ at()
|
inlineconstexprinherited |
Returns reference to the i'th element.
Element access
References Dune::ReservedVector< T, n >::size().
◆ begin()
|
inlineconstexprnoexceptinherited |
Returns a iterator pointing to the beginning of the vector.
Iterators
Referenced by Dune::YaspGrid< dim, Coordinates >::begin(), Dune::ReservedVector< T, n >::crbegin(), Dune::ReservedVector< T, n >::crend(), Dune::ReservedVector< T, n >::operator<=>(), Dune::PDELab::MultiIndex< T, n >::operator==(), Dune::ReservedVector< T, n >::rbegin(), and Dune::ReservedVector< T, n >::rend().
◆ clear()
|
inlineconstexprnoexceptinherited |
Erases all elements.
Modifiers
◆ fill()
|
inlineconstexprnoexceptinherited |
◆ operator==() [1/2]
|
inline |
Tests whether two MultiIndices are equal.
- Note
- Only MultiIndices of identical max_depth are comparable.
References Dune::ReservedVector< T, n >::begin(), Dune::ReservedVector< T, n >::end(), and Dune::ReservedVector< T, n >::size().
◆ operator==() [2/2]
|
inlineconstexprnoexceptinherited |
Compares the values in the vector this with that for equality.
Comparison
References Dune::ReservedVector< T, n >::size().
◆ size()
|
inlineconstexprnoexceptinherited |
Returns number of elements in the vector.
Capacity
Referenced by Dune::ReservedVector< T, n >::at(), Dune::ReservedVector< T, n >::cend(), Dune::ReservedVector< T, n >::crbegin(), Dune::ReservedVector< T, n >::end(), Dune::ReservedVector< T, n >::fill(), Dune::YaspGrid< dim, Coordinates >::globalRefine(), Dune::YaspGrid< dim, Coordinates >::maxLevel(), Dune::PDELab::MultiIndex< T, n >::MultiIndex(), Dune::PDELab::MultiIndex< T, n >::operator==(), Dune::ReservedVector< T, n >::operator==(), Dune::PDELab::MultiIndex< T, n >::pop_front(), Dune::PDELab::MultiIndex< T, n >::push_front(), Dune::ReservedVector< T, n >::rbegin(), and GlobalBasisMoc< dim >::size().
The documentation for this class was generated from the following file:
- dune/pdelab/common/multiindex.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Nov 2, 23:43, 2025)