riccaticpp
|
#include <arena_matrix.hpp>
Public Types | |
using | Scalar = typename std::decay_t<MatrixType>::Scalar |
using | Base = Eigen::Map<MatrixType> |
using | PlainObject = std::decay_t<MatrixType> |
typedef Eigen::internal::remove_all< Base >::type | NestedExpression |
using | allocator_t = arena_allocator<Scalar, arena_alloc> |
Public Member Functions | |
template<typename T > | |
arena_matrix (arena_allocator< T, arena_alloc > &allocator) | |
template<typename T > | |
arena_matrix (arena_allocator< T, arena_alloc > &allocator, Eigen::Index rows, Eigen::Index cols) | |
template<typename T > | |
arena_matrix (arena_allocator< T, arena_alloc > &allocator, Eigen::Index size) | |
template<typename T , typename Expr > | |
arena_matrix (arena_allocator< T, arena_alloc > &allocator, const Expr &other) | |
arena_matrix (const Base &other) | |
arena_matrix (const arena_matrix< MatrixType > &other) | |
arena_matrix & | operator= (const arena_matrix< MatrixType > &other) |
template<typename T > | |
arena_matrix & | operator= (const T &a) |
Public Attributes | |
allocator_t | allocator_ |
Static Public Attributes | |
static constexpr int | RowsAtCompileTime = MatrixType::RowsAtCompileTime |
static constexpr int | ColsAtCompileTime = MatrixType::ColsAtCompileTime |
Equivalent to Eigen::Matrix
, except that the data is stored on AD stack. That makes these objects triviali destructible and usable in vari
s.
MatrixType | Eigen matrix type this works as (MatrixXd , VectorXd ...) |
Definition at line 20 of file arena_matrix.hpp.
using riccati::arena_matrix< MatrixType >::allocator_t = arena_allocator<Scalar, arena_alloc> |
Definition at line 28 of file arena_matrix.hpp.
using riccati::arena_matrix< MatrixType >::Base = Eigen::Map<MatrixType> |
Definition at line 23 of file arena_matrix.hpp.
Eigen::internal::remove_all<Base>::type riccati::arena_matrix< MatrixType >::NestedExpression |
Definition at line 25 of file arena_matrix.hpp.
using riccati::arena_matrix< MatrixType >::PlainObject = std::decay_t<MatrixType> |
Definition at line 24 of file arena_matrix.hpp.
using riccati::arena_matrix< MatrixType >::Scalar = typename std::decay_t<MatrixType>::Scalar |
Definition at line 22 of file arena_matrix.hpp.
|
inline |
Basic allocator constructor.
allocator | The allocator to receive memory from |
Definition at line 35 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Constructs arena_matrix
with given number of rows and columns.
allocator | The allocator to receive memory from |
rows | number of rows |
cols | number of columns |
Definition at line 50 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Constructs arena_matrix
with given size. This only works if MatrixType
is row or col vector.
allocator | The allocator to receive memory from |
size | number of elements |
Definition at line 64 of file arena_matrix.hpp.
|
inline |
Constructs arena_matrix
from an expression.
allocator | The allocator to receive memory from |
other | expression |
Definition at line 74 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Constructs arena_matrix
from an expression. This makes an assumption that any other Eigen::Map
also contains memory allocated in the arena.
other | expression |
Definition at line 96 of file arena_matrix.hpp.
|
inline |
Copy constructor.
other | matrix to copy from |
Definition at line 103 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Copy assignment operator.
other | matrix to copy from |
*this
Definition at line 119 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Assignment operator for assigning an expression.
a | expression to evaluate into this |
*this
Definition at line 135 of file arena_matrix.hpp.
References riccati::arena_matrix< MatrixType >::allocator_, riccati::arena_matrix< MatrixType >::ColsAtCompileTime, riccati::arena_allocator< T, ArenaType >::owns_alloc_, and riccati::arena_matrix< MatrixType >::RowsAtCompileTime.
allocator_t riccati::arena_matrix< MatrixType >::allocator_ |
Definition at line 29 of file arena_matrix.hpp.
|
staticconstexpr |
Definition at line 27 of file arena_matrix.hpp.
|
staticconstexpr |
Definition at line 26 of file arena_matrix.hpp.