Function apriltag_sys::matd_op

source ·
pub unsafe extern "C" fn matd_op(
    expr: *const c_char,
     ...
) -> *mut matd_t
Expand description

Creates a new matrix by applying a series of matrix operations, as expressed in ‘expr’, to the supplied list of matrices. Each matrix to be operated upon must be represented in the expression by a separate matrix placeholder, ‘M’, and there must be one matrix supplied as an argument for each matrix placeholder in the expression. All rules and caveats of the corresponding matrix operations apply to the operated-on matrices. It is the caller’s responsibility to call matd_destroy() on the returned matrix.

Available operators (in order of increasing precedence): M+M add two matrices together M-M subtract one matrix from another M*M multiply two matrices together (matrix product) MM multiply two matrices together (matrix product) -M negate a matrix M^-1 take the inverse of a matrix M’ take the transpose of a matrix

Expressions can be combined together and grouped by enclosing them in parenthesis, i.e.: -M(M+M+M)-(M*M)^-1

Scalar values can be generated on-the-fly, i.e.: M*2.2 scales M by 2.2 -2+M adds -2 to all elements of M

All whitespace in the expression is ignored.