![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/variable_matrix.hpp>
Classes | |
struct | empty_t |
Public Member Functions | |
VariableMatrix ()=default | |
VariableMatrix (int rows) | |
VariableMatrix (int rows, int cols) | |
VariableMatrix (empty_t, int rows, int cols) | |
VariableMatrix (std::initializer_list< std::initializer_list< Variable > > list) | |
VariableMatrix (const std::vector< std::vector< double > > &list) | |
VariableMatrix (const std::vector< std::vector< Variable > > &list) | |
template<typename Derived > | |
VariableMatrix (const Eigen::MatrixBase< Derived > &values) | |
template<typename Derived > | |
VariableMatrix (const Eigen::DiagonalBase< Derived > &values) | |
template<typename Derived > | |
VariableMatrix & | operator= (const Eigen::MatrixBase< Derived > &values) |
VariableMatrix & | operator= (ScalarLike auto value) |
template<typename Derived > requires std::same_as<typename Derived::Scalar, double> | |
void | set_value (const Eigen::MatrixBase< Derived > &values) |
VariableMatrix (const Variable &variable) | |
VariableMatrix (Variable &&variable) | |
VariableMatrix (const VariableBlock< VariableMatrix > &values) | |
VariableMatrix (const VariableBlock< const VariableMatrix > &values) | |
VariableMatrix (std::span< const Variable > values) | |
VariableMatrix (std::span< const Variable > values, int rows, int cols) | |
Variable & | operator() (int row, int col) |
const Variable & | operator() (int row, int col) const |
Variable & | operator[] (int row) |
const Variable & | operator[] (int row) const |
VariableBlock< VariableMatrix > | block (int row_offset, int col_offset, int block_rows, int block_cols) |
const VariableBlock< const VariableMatrix > | block (int row_offset, int col_offset, int block_rows, int block_cols) const |
VariableBlock< VariableMatrix > | operator() (Slice row_slice, Slice col_slice) |
const VariableBlock< const VariableMatrix > | operator() (Slice row_slice, Slice col_slice) const |
VariableBlock< VariableMatrix > | operator() (Slice row_slice, int row_slice_length, Slice col_slice, int col_slice_length) |
const VariableBlock< const VariableMatrix > | operator() (Slice row_slice, int row_slice_length, Slice col_slice, int col_slice_length) const |
VariableBlock< VariableMatrix > | segment (int offset, int length) |
const VariableBlock< const VariableMatrix > | segment (int offset, int length) const |
VariableBlock< VariableMatrix > | row (int row) |
const VariableBlock< const VariableMatrix > | row (int row) const |
VariableBlock< VariableMatrix > | col (int col) |
const VariableBlock< const VariableMatrix > | col (int col) const |
VariableMatrix & | operator*= (const MatrixLike auto &rhs) |
VariableMatrix & | operator*= (const ScalarLike auto &rhs) |
VariableMatrix & | operator/= (const ScalarLike auto &rhs) |
VariableMatrix & | operator+= (const MatrixLike auto &rhs) |
VariableMatrix & | operator+= (const ScalarLike auto &rhs) |
VariableMatrix & | operator-= (const MatrixLike auto &rhs) |
VariableMatrix & | operator-= (const ScalarLike auto &rhs) |
operator Variable () const | |
VariableMatrix | T () const |
int | rows () const |
int | cols () const |
double | value (int row, int col) |
double | value (int index) |
Eigen::MatrixXd | value () |
VariableMatrix | cwise_transform (function_ref< Variable(const Variable &x)> unary_op) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
size_t | size () const |
Static Public Member Functions | |
static VariableMatrix | zero (int rows, int cols) |
static VariableMatrix | ones (int rows, int cols) |
Static Public Attributes | |
static constexpr empty_t | empty {} |
Friends | |
template<MatrixLike LHS, MatrixLike RHS> requires SleipnirMatrixLike<LHS> || SleipnirMatrixLike<RHS> | |
SLEIPNIR_DLLEXPORT VariableMatrix | operator* (const LHS &lhs, const RHS &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator* (const SleipnirMatrixLike auto &lhs, const ScalarLike auto &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator* (const MatrixLike auto &lhs, const Variable &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator* (const ScalarLike auto &lhs, const SleipnirMatrixLike auto &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator* (const Variable &lhs, const MatrixLike auto &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator/ (const MatrixLike auto &lhs, const ScalarLike auto &rhs) |
template<MatrixLike LHS, MatrixLike RHS> requires SleipnirMatrixLike<LHS> || SleipnirMatrixLike<RHS> | |
SLEIPNIR_DLLEXPORT VariableMatrix | operator+ (const LHS &lhs, const RHS &rhs) |
template<MatrixLike LHS, MatrixLike RHS> requires SleipnirMatrixLike<LHS> || SleipnirMatrixLike<RHS> | |
SLEIPNIR_DLLEXPORT VariableMatrix | operator- (const LHS &lhs, const RHS &rhs) |
SLEIPNIR_DLLEXPORT VariableMatrix | operator- (const SleipnirMatrixLike auto &lhs) |
A matrix of autodiff variables.
|
default |
Constructs an empty VariableMatrix.
|
inlineexplicit |
Constructs a VariableMatrix column vector with the given rows.
rows | The number of matrix rows. |
|
inline |
Constructs a zero-initialized VariableMatrix with the given dimensions.
rows | The number of matrix rows. |
cols | The number of matrix columns. |
|
inline |
Constructs an empty VariableMatrix with the given dimensions.
rows | The number of matrix rows. |
cols | The number of matrix columns. |
|
inline |
Constructs a scalar VariableMatrix from a nested list of Variables.
list | The nested list of Variables. |
|
inline |
Constructs a scalar VariableMatrix from a nested list of doubles.
This overload is for Python bindings only.
list | The nested list of Variables. |
|
inline |
Constructs a scalar VariableMatrix from a nested list of Variables.
This overload is for Python bindings only.
list | The nested list of Variables. |
|
inline |
Constructs a VariableMatrix from an Eigen matrix.
values | Eigen matrix of values. |
|
inline |
Constructs a VariableMatrix from an Eigen diagonal matrix.
values | Diagonal matrix of values. |
|
inline |
Constructs a scalar VariableMatrix from a Variable.
variable | Variable. |
|
inline |
Constructs a scalar VariableMatrix from a Variable.
variable | Variable. |
|
inline |
Constructs a VariableMatrix from a VariableBlock.
values | VariableBlock of values. |
|
inline |
Constructs a VariableMatrix from a VariableBlock.
values | VariableBlock of values. |
|
inlineexplicit |
|
inline |
|
inline |
Returns begin iterator.
|
inline |
Returns begin iterator.
|
inline |
Returns a block of the variable matrix.
row_offset | The row offset of the block selection. |
col_offset | The column offset of the block selection. |
block_rows | The number of rows in the block selection. |
block_cols | The number of columns in the block selection. |
|
inline |
Returns a block of the variable matrix.
row_offset | The row offset of the block selection. |
col_offset | The column offset of the block selection. |
block_rows | The number of rows in the block selection. |
block_cols | The number of columns in the block selection. |
|
inline |
Returns begin iterator.
|
inline |
Returns end iterator.
|
inline |
Returns a column slice of the variable matrix.
col | The column to slice. |
|
inline |
Returns a column slice of the variable matrix.
col | The column to slice. |
|
inline |
Returns the number of columns in the matrix.
|
inline |
Transforms the matrix coefficient-wise with an unary operator.
unary_op | The unary operator to use for the transform operation. |
|
inline |
Returns end iterator.
|
inline |
Returns end iterator.
|
inlinestatic |
Returns a variable matrix filled with ones.
rows | The number of matrix rows. |
cols | The number of matrix columns. |
|
inline |
Implicit conversion operator from 1x1 VariableMatrix to Variable.
|
inline |
Returns a block pointing to the given row and column.
row | The block row. |
col | The block column. |
|
inline |
Returns a block pointing to the given row and column.
row | The block row. |
col | The block column. |
|
inline |
Returns a slice of the variable matrix.
The given slices aren't adjusted. This overload is for Python bindings only.
row_slice | The row slice. |
row_slice_length | The row slice length. |
col_slice | The column slice. |
col_slice_length | The column slice length. |
|
inline |
Returns a slice of the variable matrix.
The given slices aren't adjusted. This overload is for Python bindings only.
row_slice | The row slice. |
row_slice_length | The row slice length. |
col_slice | The column slice. |
col_slice_length | The column slice length. |
|
inline |
Returns a slice of the variable matrix.
row_slice | The row slice. |
col_slice | The column slice. |
|
inline |
Returns a slice of the variable matrix.
row_slice | The row slice. |
col_slice | The column slice. |
|
inline |
Compound matrix multiplication-assignment operator.
rhs | Variable to multiply. |
|
inline |
Compound matrix-scalar multiplication-assignment operator.
rhs | Variable to multiply. |
|
inline |
|
inline |
|
inline |
Compound subtraction-assignment operator.
rhs | Variable to subtract. |
|
inline |
Compound subtraction-assignment operator.
rhs | Variable to subtract. |
|
inline |
Compound matrix division-assignment operator.
rhs | Variable to divide. |
|
inline |
Assigns an Eigen matrix to a VariableMatrix.
values | Eigen matrix of values. |
|
inline |
Assigns a double to the matrix.
This only works for matrices with one row and one column.
value | Value to assign. |
|
inline |
Returns a block pointing to the given row.
row | The block row. |
|
inline |
Returns a block pointing to the given row.
row | The block row. |
|
inline |
Returns a row slice of the variable matrix.
row | The row to slice. |
|
inline |
Returns a row slice of the variable matrix.
row | The row to slice. |
|
inline |
Returns the number of rows in the matrix.
|
inline |
Returns a segment of the variable vector.
offset | The offset of the segment. |
length | The length of the segment. |
|
inline |
Returns a segment of the variable vector.
offset | The offset of the segment. |
length | The length of the segment. |
|
inline |
Sets the VariableMatrix's internal values.
values | Eigen matrix of values. |
|
inline |
Returns number of elements in matrix.
|
inline |
Returns the transpose of the variable matrix.
|
inline |
Returns the contents of the variable matrix.
|
inline |
Returns a row of the variable column vector.
index | The index of the element to return. |
|
inline |
Returns an element of the variable matrix.
row | The row of the element to return. |
col | The column of the element to return. |
|
inlinestatic |
Returns a variable matrix filled with zeroes.
rows | The number of matrix rows. |
cols | The number of matrix columns. |
|
friend |
Matrix multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Matrix-scalar multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Scalar-matrix multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Matrix-scalar multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Scalar-matrix multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Binary addition operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Binary subtraction operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Unary minus operator.
lhs | Operand for unary minus. |
|
friend |
Binary division operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
staticconstexpr |
Designates an uninitialized VariableMatrix.