![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/variable_block.hpp>
Public Member Functions | |
| VariableBlock (const VariableBlock< Mat > &)=default | |
| VariableBlock< Mat > & | operator= (const VariableBlock< Mat > &values) |
| VariableBlock (VariableBlock< Mat > &&)=default | |
| VariableBlock< Mat > & | operator= (VariableBlock< Mat > &&values) |
| VariableBlock (Mat &mat) | |
| VariableBlock (Mat &mat, int row_offset, int col_offset, int block_rows, int block_cols) | |
| VariableBlock (Mat &mat, Slice row_slice, int row_slice_length, Slice col_slice, int col_slice_length) | |
| VariableBlock< Mat > & | operator= (ScalarLike auto value) |
| void | set_value (double value) |
| template<typename Derived > | |
| VariableBlock< Mat > & | operator= (const Eigen::MatrixBase< Derived > &values) |
| template<typename Derived > requires std::same_as<typename Derived::Scalar, double> | |
| void | set_value (const Eigen::MatrixBase< Derived > &values) |
| VariableBlock< Mat > & | operator= (const Mat &values) |
| VariableBlock< Mat > & | operator= (Mat &&values) |
| Variable & | operator[] (int row, int col) |
| const Variable & | operator[] (int row, int col) const |
| Variable & | operator[] (int index) |
| const Variable & | operator[] (int index) const |
| VariableBlock< Mat > | block (int row_offset, int col_offset, int block_rows, int block_cols) |
| const VariableBlock< const Mat > | block (int row_offset, int col_offset, int block_rows, int block_cols) const |
| VariableBlock< Mat > | operator[] (Slice row_slice, Slice col_slice) |
| const VariableBlock< const Mat > | operator[] (Slice row_slice, Slice col_slice) const |
| VariableBlock< Mat > | operator[] (Slice row_slice, int row_slice_length, Slice col_slice, int col_slice_length) |
| const VariableBlock< const Mat > | operator[] (Slice row_slice, int row_slice_length, Slice col_slice, int col_slice_length) const |
| VariableBlock< Mat > | segment (int offset, int length) |
| const VariableBlock< Mat > | segment (int offset, int length) const |
| VariableBlock< Mat > | row (int row) |
| VariableBlock< const Mat > | row (int row) const |
| VariableBlock< Mat > | col (int col) |
| VariableBlock< const Mat > | col (int col) const |
| VariableBlock< Mat > & | operator*= (const MatrixLike auto &rhs) |
| VariableBlock< Mat > & | operator*= (const ScalarLike auto &rhs) |
| VariableBlock< Mat > & | operator/= (const MatrixLike auto &rhs) |
| VariableBlock< Mat > & | operator/= (const ScalarLike auto &rhs) |
| VariableBlock< Mat > & | operator+= (const MatrixLike auto &rhs) |
| VariableBlock< Mat > & | operator+= (const ScalarLike auto &rhs) |
| VariableBlock< Mat > & | operator-= (const MatrixLike auto &rhs) |
| VariableBlock< Mat > & | operator-= (const ScalarLike auto &rhs) |
| operator Variable () const | |
| std::remove_cv_t< Mat > | T () const |
| int | rows () const |
| int | cols () const |
| double | value (int row, int col) |
| double | value (int index) |
| Eigen::MatrixXd | value () |
| std::remove_cv_t< Mat > | 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 |
| reverse_iterator | rbegin () |
| reverse_iterator | rend () |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | rend () const |
| const_reverse_iterator | crbegin () const |
| const_reverse_iterator | crend () const |
| size_t | size () const |
A submatrix of autodiff variables with reference semantics.
| Mat | The type of the matrix whose storage this class points to. |
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Constructs a Variable block pointing to all of the given matrix.
| mat | The matrix to which to point. |
|
inline |
Constructs a Variable block pointing to a subset of the given matrix.
| mat | The matrix to which to point. |
| row_offset | The block's row offset. |
| col_offset | The block's column offset. |
| block_rows | The number of rows in the block. |
| block_cols | The number of columns in the block. |
|
inline |
Constructs a Variable block pointing to a subset of the given matrix.
Note that the slices are taken as is rather than adjusted.
| mat | The matrix to which to point. |
| row_slice | The block's row slice. |
| row_slice_length | The block's row length. |
| col_slice | The block's column slice. |
| col_slice_length | The block's column length. |
|
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 slice 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 const begin iterator.
|
inline |
Returns const 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 |
Returns const reverse begin iterator.
|
inline |
Returns const reverse end iterator.
|
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.
|
inline |
Implicit conversion operator from 1x1 VariableBlock to Variable.
|
inline |
Compound matrix multiplication-assignment operator.
| rhs | Variable to multiply. |
|
inline |
Compound matrix 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 |
Compound matrix division-assignment operator.
| rhs | Variable to divide. |
|
inline |
Assigns an Eigen matrix to the block.
| values | Eigen matrix of values to assign. |
|
inline |
Assigns a VariableMatrix to the block.
| values | VariableMatrix of values. |
|
inline |
Assigns a VariableBlock to the block.
| values | VariableBlock of values. |
|
inline |
Assigns a VariableMatrix to the block.
| values | VariableMatrix of values. |
|
inline |
Assigns a scalar to the block.
This only works for blocks with one row and one column.
| value | Value to assign. |
|
inline |
Assigns a VariableBlock to the block.
| values | VariableBlock of values. |
|
inline |
Returns a scalar subblock at the given index.
| index | The scalar subblock's index. |
|
inline |
Returns a scalar subblock at the given index.
| index | The scalar subblock's index. |
|
inline |
Returns a scalar subblock at the given row and column.
| row | The scalar subblock's row. |
| col | The scalar subblock's column. |
|
inline |
Returns a scalar subblock at the given row and column.
| row | The scalar subblock's row. |
| col | The scalar subblock's 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 |
Returns reverse begin iterator.
|
inline |
Returns const reverse begin iterator.
|
inline |
Returns reverse end iterator.
|
inline |
Returns const reverse end iterator.
|
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 block's internal values.
| values | Eigen matrix of values. |
|
inline |
Assigns a double to the block.
This only works for blocks with one row and one column.
| value | Value to assign. |
|
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 an element of the variable block.
| 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. |