Compile-time wrapper for Eigen::Matrix. More...
#include <frc/ct_matrix.h>
Public Member Functions | |
constexpr | ct_matrix ()=default |
constexpr | ct_matrix (std::initializer_list< std::initializer_list< Scalar > > list) |
Constructs a scalar VariableMatrix from a nested list of Variables. | |
template<typename Derived > requires std::derived_from<Derived, Eigen::MatrixBase<Derived>> | |
constexpr | ct_matrix (const Derived &mat) |
constexpr int | rows () const |
Returns number of rows. | |
constexpr int | cols () const |
Returns number of columns. | |
constexpr const Scalar & | operator() (int row, int col) const |
Returns reference to matrix element. | |
constexpr Scalar & | operator() (int row, int col) |
Returns reference to matrix element. | |
constexpr const Scalar & | operator() (int index) const |
Returns reference to matrix element. | |
constexpr Scalar & | operator() (int index) |
Returns reference to matrix element. | |
constexpr ct_matrix< Scalar, Cols, Rows > | transpose () const |
Constexpr version of Eigen's transpose member function. | |
template<int RhsRows, int RhsCols> requires (Rows == 1 || Cols == 1) && (RhsRows == 1 || RhsCols == 1) && (Rows * Cols == RhsRows * RhsCols) | |
constexpr Scalar | dot (const ct_matrix< Scalar, RhsRows, RhsCols > &rhs) const |
Constexpr version of Eigen's vector dot member function. | |
constexpr Scalar | norm () const |
Constexpr version of Eigen's norm member function. | |
constexpr ct_matrix< Scalar, 3, 1 > | cross (const ct_matrix< Scalar, 3, 1 > &rhs) |
Constexpr version of Eigen's 3D vector cross member function. | |
constexpr Scalar | determinant () const |
Constexpr version of Eigen's 2x2 matrix determinant member function. | |
constexpr Scalar | determinant () const |
Constexpr version of Eigen's 3x3 matrix determinant member function. | |
constexpr const Eigen::Matrix< Scalar, Rows, Cols > & | storage () const |
Returns the internal Eigen matrix. | |
constexpr | operator Eigen::Matrix< Scalar, Rows, Cols > () const |
Implicit cast to an Eigen matrix. | |
Static Public Member Functions | |
static constexpr ct_matrix< Scalar, Rows, Cols > | Identity () |
Constexpr version of Eigen's identity function. | |
Friends | |
constexpr ct_matrix< Scalar, Rows, Cols > | operator* (Scalar lhs, const ct_matrix< Scalar, Rows, Cols > &rhs) |
Constexpr version of Eigen's scalar multiplication operator. | |
template<int Cols2> | |
constexpr ct_matrix< Scalar, Rows, Cols2 > | operator* (const ct_matrix< Scalar, Rows, Cols > &lhs, const ct_matrix< Scalar, Rows, Cols2 > &rhs) |
Constexpr version of Eigen's matrix multiplication operator. | |
constexpr ct_matrix< Scalar, Rows, Cols > | operator+ (const ct_matrix< Scalar, Rows, Cols > &lhs, const ct_matrix< Scalar, Rows, Cols > &rhs) |
Constexpr version of Eigen's matrix addition operator. | |
constexpr ct_matrix< Scalar, Rows, Cols > | operator- (const ct_matrix< Scalar, Rows, Cols > &lhs, const ct_matrix< Scalar, Rows, Cols > &rhs) |
Constexpr version of Eigen's matrix subtraction operator. | |
Compile-time wrapper for Eigen::Matrix.
Rows | Rows of matrix. |
Cols | Columns of matrix. |
|
constexprdefault |
|
inlineconstexpr |
Constructs a scalar VariableMatrix from a nested list of Variables.
list | The nested list of Variables. |
|
inlineconstexpr |
|
inlineconstexpr |
Returns number of columns.
|
inlineconstexpr |
Constexpr version of Eigen's 3D vector cross member function.
rhs | RHS vector. |
|
inlineconstexpr |
Constexpr version of Eigen's 2x2 matrix determinant member function.
|
inlineconstexpr |
Constexpr version of Eigen's 3x3 matrix determinant member function.
|
inlineconstexpr |
Constexpr version of Eigen's vector dot member function.
RhsRows | Rows of RHS vector. |
RhsCols | Columns of RHS vector. |
rhs | RHS vector. |
|
inlinestaticconstexpr |
Constexpr version of Eigen's identity function.
|
inlineconstexpr |
Constexpr version of Eigen's norm member function.
|
inlineconstexpr |
Implicit cast to an Eigen matrix.
|
inlineconstexpr |
Returns reference to matrix element.
index | Index. |
|
inlineconstexpr |
Returns reference to matrix element.
index | Index. |
|
inlineconstexpr |
Returns reference to matrix element.
row | Row index. |
col | Column index. |
|
inlineconstexpr |
Returns reference to matrix element.
row | Row index. |
col | Column index. |
|
inlineconstexpr |
Returns number of rows.
|
inlineconstexpr |
|
inlineconstexpr |
Constexpr version of Eigen's transpose member function.
|
friend |
Constexpr version of Eigen's matrix multiplication operator.
Cols2 | Columns of RHS matrix. |
lhs | LHS matrix. |
rhs | RHS matrix. |
|
friend |
Constexpr version of Eigen's scalar multiplication operator.
lhs | LHS scalar. |
rhs | RHS matrix. |
|
friend |
Constexpr version of Eigen's matrix addition operator.
lhs | LHS matrix. |
rhs | RHS matrix. |
|
friend |
Constexpr version of Eigen's matrix subtraction operator.
lhs | LHS matrix. |
rhs | RHS matrix. |