Function nrm2 (o2scl_cblas)

O2scl : Function List

template<class vec_t, class fp_t = double>
fp_t o2scl_cblas::nrm2(const size_t N, const vec_t &X)

Compute the norm of the vector X.

If N is less than or equal to zero, this function returns zero without calling the error handler.

Note

The suffix “2” on the function name indicates that this computes the “2-norm”, not that the norm is squared.