Skip to content

num::accu

Defined in header <linear/matrix_utils.hpp>

real accu(const mat<real> &A);  // (1)

real accu(const vec<real> &v);  // (2)

(1) Sum of all elements in a matrix.

(2) Sum of all elements in a vector.