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) Return A-B.

Allocates; prefer the out-param form in hot loops.

(2) Return x-y.

Allocates; prefer the out-param form in hot loops.