![]() |
WPILibC++ 2025.3.2
|
A submatrix of autodiff variables with reference semantics. More...
Classes | |
| class | const_iterator |
| class | iterator |
Public Member Functions | |
| VariableBlock (const VariableBlock< Mat > &values)=default | |
| VariableBlock< Mat > & | operator= (const VariableBlock< Mat > &values) |
| Assigns a VariableBlock to the block. | |
| VariableBlock (VariableBlock< Mat > &&)=default | |
| VariableBlock< Mat > & | operator= (VariableBlock< Mat > &&values) |
| Assigns a VariableBlock to the block. | |
| VariableBlock (Mat &mat) | |
| Constructs a Variable block pointing to all of the given matrix. | |
| VariableBlock (Mat &mat, int rowOffset, int colOffset, int blockRows, int blockCols) | |
| Constructs a Variable block pointing to a subset of the given matrix. | |
| VariableBlock (Mat &mat, Slice rowSlice, int rowSliceLength, Slice colSlice, int colSliceLength) | |
| Constructs a Variable block pointing to a subset of the given matrix. | |
| VariableBlock< Mat > & | operator= (double value) |
| Assigns a double to the block. | |
| void | SetValue (double value) |
| Assigns a double to the block. | |
| template<typename Derived > | |
| VariableBlock< Mat > & | operator= (const Eigen::MatrixBase< Derived > &values) |
| Assigns an Eigen matrix to the block. | |
| template<typename Derived > requires std::same_as<typename Derived::Scalar, double> | |
| void | SetValue (const Eigen::MatrixBase< Derived > &values) |
| Sets block's internal values. | |
| VariableBlock< Mat > & | operator= (const Mat &values) |
| Assigns a VariableMatrix to the block. | |
| VariableBlock< Mat > & | operator= (Mat &&values) |
| Assigns a VariableMatrix to the block. | |
| Variable & | operator() (int row, int col) |
| Returns a scalar subblock at the given row and column. | |
| const Variable & | operator() (int row, int col) const |
| Returns a scalar subblock at the given row and column. | |
| Variable & | operator() (int row) |
| Returns a scalar subblock at the given row. | |
| const Variable & | operator() (int row) const |
| Returns a scalar subblock at the given row. | |
| VariableBlock< Mat > | Block (int rowOffset, int colOffset, int blockRows, int blockCols) |
| Returns a block of the variable matrix. | |
| const VariableBlock< const Mat > | Block (int rowOffset, int colOffset, int blockRows, int blockCols) const |
| Returns a block slice of the variable matrix. | |
| VariableBlock< Mat > | operator() (Slice rowSlice, Slice colSlice) |
| Returns a slice of the variable matrix. | |
| const VariableBlock< const Mat > | operator() (Slice rowSlice, Slice colSlice) const |
| Returns a slice of the variable matrix. | |
| VariableBlock< Mat > | operator() (Slice rowSlice, int rowSliceLength, Slice colSlice, int colSliceLength) |
| Returns a slice of the variable matrix. | |
| const VariableBlock< const Mat > | operator() (Slice rowSlice, int rowSliceLength, Slice colSlice, int colSliceLength) const |
| Returns a slice of the variable matrix. | |
| VariableBlock< Mat > | Segment (int offset, int length) |
| Returns a segment of the variable vector. | |
| const VariableBlock< Mat > | Segment (int offset, int length) const |
| Returns a segment of the variable vector. | |
| VariableBlock< Mat > | Row (int row) |
| Returns a row slice of the variable matrix. | |
| VariableBlock< const Mat > | Row (int row) const |
| Returns a row slice of the variable matrix. | |
| VariableBlock< Mat > | Col (int col) |
| Returns a column slice of the variable matrix. | |
| VariableBlock< const Mat > | Col (int col) const |
| Returns a column slice of the variable matrix. | |
| VariableBlock< Mat > & | operator*= (const VariableBlock< Mat > &rhs) |
| Compound matrix multiplication-assignment operator. | |
| VariableBlock & | operator*= (double rhs) |
| Compound matrix multiplication-assignment operator (only enabled when lhs is a scalar). | |
| VariableBlock< Mat > & | operator/= (const VariableBlock< Mat > &rhs) |
| Compound matrix division-assignment operator (only enabled when rhs is a scalar). | |
| VariableBlock< Mat > & | operator/= (double rhs) |
| Compound matrix division-assignment operator (only enabled when rhs is a scalar). | |
| VariableBlock< Mat > & | operator+= (const VariableBlock< Mat > &rhs) |
| Compound addition-assignment operator. | |
| VariableBlock< Mat > & | operator-= (const VariableBlock< Mat > &rhs) |
| Compound subtraction-assignment operator. | |
| std::remove_cv_t< Mat > | T () const |
| Returns the transpose of the variable matrix. | |
| int | Rows () const |
| Returns number of rows in the matrix. | |
| int | Cols () const |
| Returns number of columns in the matrix. | |
| double | Value (int row, int col) |
| Returns an element of the variable matrix. | |
| double | Value (int index) |
| Returns a row of the variable column vector. | |
| Eigen::MatrixXd | Value () |
| Returns the contents of the variable matrix. | |
| std::remove_cv_t< Mat > | CwiseTransform (function_ref< Variable(const Variable &x)> unaryOp) const |
| Transforms the matrix coefficient-wise with an unary operator. | |
| iterator | begin () |
| Returns begin iterator. | |
| iterator | end () |
| Returns end iterator. | |
| const_iterator | begin () const |
| Returns begin iterator. | |
| const_iterator | end () const |
| Returns end iterator. | |
| const_iterator | cbegin () const |
| Returns begin iterator. | |
| const_iterator | cend () const |
| Returns end iterator. | |
| size_t | size () const |
| Returns number of elements in matrix. | |
A submatrix of autodiff variables with reference semantics.
| Mat | The type of the matrix whose storage this class points to. |
|
default |
|
default |
|
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. |
| rowOffset | The block's row offset. |
| colOffset | The block's column offset. |
| blockRows | The number of rows in the block. |
| blockCols | 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. |
| rowSlice | The block's row slice. |
| rowSliceLength | The block's row length. |
| colSlice | The block's column slice. |
| colSliceLength | The block's column length. |
|
inline |
Returns begin iterator.
|
inline |
Returns begin iterator.
|
inline |
Returns a block of the variable matrix.
| rowOffset | The row offset of the block selection. |
| colOffset | The column offset of the block selection. |
| blockRows | The number of rows in the block selection. |
| blockCols | The number of columns in the block selection. |
|
inline |
Returns a block slice of the variable matrix.
| rowOffset | The row offset of the block selection. |
| colOffset | The column offset of the block selection. |
| blockRows | The number of rows in the block selection. |
| blockCols | 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 number of columns in the matrix.
|
inline |
Transforms the matrix coefficient-wise with an unary operator.
| unaryOp | The unary operator to use for the transform operation. |
|
inline |
Returns end iterator.
|
inline |
Returns end iterator.
|
inline |
Returns a scalar subblock at the given row.
| row | The scalar subblock's row. |
|
inline |
Returns a scalar subblock at the given row.
| row | The scalar subblock's row. |
|
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.
| rowSlice | The row slice. |
| rowSliceLength | The row slice length. |
| colSlice | The column slice. |
| colSliceLength | 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.
| rowSlice | The row slice. |
| rowSliceLength | The row slice length. |
| colSlice | The column slice. |
| colSliceLength | The column slice length. |
|
inline |
Returns a slice of the variable matrix.
| rowSlice | The row slice. |
| colSlice | The column slice. |
|
inline |
Returns a slice of the variable matrix.
| rowSlice | The row slice. |
| colSlice | The column slice. |
|
inline |
Compound matrix multiplication-assignment operator.
| rhs | Variable to multiply. |
|
inline |
Compound matrix multiplication-assignment operator (only enabled when lhs is a scalar).
| rhs | Variable to multiply. |
|
inline |
Compound addition-assignment operator.
| rhs | Variable to add. |
|
inline |
Compound subtraction-assignment operator.
| rhs | Variable to subtract. |
|
inline |
Compound matrix division-assignment operator (only enabled when rhs is a scalar).
| rhs | Variable to divide. |
|
inline |
Compound matrix division-assignment operator (only enabled when rhs is a scalar).
| rhs | Variable to divide. |
|
inline |
|
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 double to the block.
This only works for blocks with one row and one column.
|
inline |
Assigns a VariableMatrix to the block.
| values | VariableMatrix of values. |
|
inline |
Assigns a VariableBlock to the block.
| values | VariableBlock of values. |
|
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 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 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. |