Skip to content

num::sub

Defined in header <container/matrix_expr.hpp>

mat<real> sub(const mat<real> &A, const mat<real> &B);  // (1)

vec<real> sub(const vec<real> &x, const vec<real> &y);  // (2)

(1) Subtract two matrices: \(A - B\). Allocates.

(2) Subtract two vectors: \(x - y\). Allocates.