aligator
0.15.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
#include <aligator/memory/arena-matrix.hpp>
Public Types | |
using | Scalar = typename std::decay_t<MatrixType>::Scalar |
using | PlainObject = std::decay_t<MatrixType> |
using | Base = Eigen::Map<PlainObject, Alignment> |
using | Index = Eigen::Index |
using | ConstMapType = Eigen::Map<const PlainObject, Alignment> |
using | allocator_type = polymorphic_allocator |
Public Member Functions | |
ArenaMatrix () | |
ArenaMatrix (const allocator_type &allocator) | |
allocator_type | get_allocator () const noexcept |
ArenaMatrix (Index cols, Index rows, const allocator_type &allocator={}) | |
ArenaMatrix (Index size, const allocator_type &allocator={}) | |
template<typename D, enable_if_eigen_t< D > * = nullptr> | |
ArenaMatrix (const D &other, const allocator_type &alloc={}) | |
ArenaMatrix (const ArenaMatrix &other, const allocator_type &alloc={}) | |
ArenaMatrix (ArenaMatrix &&other) noexcept | |
ArenaMatrix (ArenaMatrix &&other, const allocator_type &alloc) | |
Extended move constructor. | |
template<typename D, enable_if_eigen_t< D > * = nullptr> | |
ArenaMatrix & | operator= (const D &other) |
ArenaMatrix & | operator= (const ArenaMatrix &other) |
ArenaMatrix & | operator= (ArenaMatrix &&other) |
operator ConstMapType () const | |
~ArenaMatrix () | |
void | resize (Index size) |
Resize this matrix. This will reallocate. | |
void | resize (Index rows, Index cols) |
Resize this matrix. This will reallocate. | |
void | conservativeResize (Index size) |
void | conservativeResize (Index rows, Index cols) |
Index | allocatedSize () const noexcept |
Current allocated size for this matrix. This is what allows resizing without reallocation. | |
ArenaMatrix & | setZero (Index newSize) |
ArenaMatrix & | setZero (Index rows, Index cols) |
ArenaMatrix & | setIdentity (Index rows, Index cols) |
Static Public Attributes | |
static constexpr int | RowsAtCompileTime = MatrixType::RowsAtCompileTime |
static constexpr int | ColsAtCompileTime = MatrixType::ColsAtCompileTime |
A replacement for Eigen::Matrix
but compatible with C++17 polymorphic allocators (through the aligator::polymorphic_allocator subclass which extends the API).
This is implemented a subclass of Eigen::Map
.
The implementation is inspired from the arena_matrix
class template in Stan's math library: See: https://mc-stan.org/math/classstan_1_1math_1_1arena__matrix_3_01_matrix_type_00_01require__eigen__dense__base__t_3_01_matrix_type_01_4_01_4.html
MatrixType | The original plain Eigen matrix type. |
Alignment | The desired alignment for the data pointer. |
Definition at line 25 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::Scalar = typename std::decay_t<MatrixType>::Scalar |
Definition at line 27 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::PlainObject = std::decay_t<MatrixType> |
Definition at line 28 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::Base = Eigen::Map<PlainObject, Alignment> |
Definition at line 29 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::Index = Eigen::Index |
Definition at line 30 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::ConstMapType = Eigen::Map<const PlainObject, Alignment> |
Definition at line 31 of file arena-matrix.hpp.
using aligator::ArenaMatrix< MatrixType, Alignment >::allocator_type = polymorphic_allocator |
Definition at line 34 of file arena-matrix.hpp.
|
inline |
Definition at line 37 of file arena-matrix.hpp.
|
inlineexplicit |
Definition at line 44 of file arena-matrix.hpp.
|
inline |
Definition at line 55 of file arena-matrix.hpp.
|
inlineexplicit |
Definition at line 60 of file arena-matrix.hpp.
|
inline |
Definition at line 66 of file arena-matrix.hpp.
|
inlineexplicit |
Definition at line 74 of file arena-matrix.hpp.
|
inlinenoexcept |
Definition at line 81 of file arena-matrix.hpp.
|
inline |
Extended move constructor.
Definition at line 90 of file arena-matrix.hpp.
|
inline |
Definition at line 143 of file arena-matrix.hpp.
|
inlinenodiscardnoexcept |
Definition at line 51 of file arena-matrix.hpp.
|
inline |
Definition at line 106 of file arena-matrix.hpp.
|
inline |
Explicitly define copy assignment operator. Required because polymorphic_allocator has its copy assignment operator implicitly deleted.
Definition at line 115 of file arena-matrix.hpp.
|
inline |
Definition at line 123 of file arena-matrix.hpp.
|
inline |
Definition at line 139 of file arena-matrix.hpp.
|
inline |
Resize this matrix. This will reallocate.
Definition at line 146 of file arena-matrix.hpp.
|
inline |
Resize this matrix. This will reallocate.
Definition at line 159 of file arena-matrix.hpp.
|
inline |
Definition at line 173 of file arena-matrix.hpp.
|
inline |
Definition at line 185 of file arena-matrix.hpp.
|
inlinenoexcept |
Current allocated size for this matrix. This is what allows resizing without reallocation.
Definition at line 200 of file arena-matrix.hpp.
|
inline |
Definition at line 204 of file arena-matrix.hpp.
|
inline |
Definition at line 209 of file arena-matrix.hpp.
|
inline |
Definition at line 216 of file arena-matrix.hpp.
|
staticconstexpr |
Definition at line 32 of file arena-matrix.hpp.
|
staticconstexpr |
Definition at line 33 of file arena-matrix.hpp.