try_matrix_add

Function try_matrix_add 

Source
pub fn try_matrix_add(
    a: &Expression,
    b: &Expression,
) -> Option<Result<Expression, MathError>>
Expand description

Try to simplify A + B for matrices directly without building expression tree

Returns Some(Ok(expr)) if both operands are matrices with compatible dimensions. Returns Some(Err(e)) if both operands are matrices but dimensions are incompatible. Returns None if either operand is not a matrix.