DUNE PDELab (2.8)
A class for representing multi-indices. More...
#include <dune/pdelab/common/multiindex.hh>
Public Types | |
typedef size_t | size_type |
An unsigned integral type. | |
typedef T | value_type |
The type of object, T, stored in the vector. More... | |
typedef T * | pointer |
Pointer to T. | |
typedef T & | reference |
Reference to T. | |
typedef const T & | const_reference |
Const reference to T. | |
typedef std::ptrdiff_t | difference_type |
A signed integral type. | |
typedef Dune::GenericIterator< ReservedVector, value_type > | iterator |
Iterator used to iterate through a vector. | |
typedef Dune::GenericIterator< const ReservedVector, const value_type > | const_iterator |
Const iterator used to iterate through a vector. | |
Public Member Functions | |
void | pop_front () |
Erases the first element of the multi-index, O(N) 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. | |
void | clear () |
Erases all elements. More... | |
void | resize (size_t s) |
Specifies a new size for the vector. | |
void | push_back (const T &t) |
Appends an element to the end of a vector, up to the maximum size n, O(1) time. | |
void | pop_back () |
Erases the last element of the vector, O(1) time. | |
iterator | begin () |
Returns a iterator pointing to the beginning of the vector. | |
const_iterator | begin () const |
Returns a const_iterator pointing to the beginning of the vector. | |
iterator | end () |
Returns an iterator pointing to the end of the vector. | |
const_iterator | end () const |
Returns a const_iterator pointing to the end of the vector. | |
reference | operator[] (size_type i) |
Returns reference to the i'th element. | |
const_reference | operator[] (size_type i) const |
Returns a const reference to the i'th element. | |
reference | front () |
Returns reference to first element of vector. | |
const_reference | front () const |
Returns const reference to first element of vector. | |
reference | back () |
Returns reference to last element of vector. | |
const_reference | back () const |
Returns const reference to last element of vector. | |
Static Public Attributes | |
static const std::size_t | max_depth = n |
The maximum possible depth of the MultiIndex. | |
size_type | size () const |
Returns number of elements in the vector. More... | |
bool | empty () const |
Returns true if vector has no elements. | |
static constexpr size_type | capacity () |
Returns current capacity (allocated memory) of the vector. | |
static constexpr size_type | max_size () |
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
|
inherited |
The type of object, T, stored in the vector.
Typedefs
Member Function Documentation
◆ clear()
|
inlineinherited |
Erases all elements.
Data access operations
◆ operator==()
|
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().
◆ size()
|
inlineinherited |
Returns number of elements in the vector.
Informative Methods
Referenced by Dune::YaspGrid< dim, Coordinates >::globalRefine(), Dune::YaspGrid< dim, Coordinates >::maxLevel(), Dune::PDELab::MultiIndex< T, n >::operator==(), Dune::PDELab::MultiIndex< T, n >::pop_front(), GlobalBasisMoc< dim >::size(), HybridSizeInfoDummy< dim >::size(), Dune::Functions::BSplinePreBasis< GV, MI >::size(), Dune::Functions::HierarchicalLagrangePreBasis< GV, k, MI, R >::size(), Dune::Functions::LagrangePreBasis< GV, k, MI, R >::size(), and Dune::Functions::RannacherTurekPreBasis< GV, MI >::size().
The documentation for this class was generated from the following file:
- dune/pdelab/common/multiindex.hh