Function vector_sum_double (o2scl)

O2scl : Function List

template<class vec_t>
double o2scl::vector_sum_double(size_t n, vec_t &data)

Compute the sum of the first n elements of a vector of double-precision numbers.

If n is zero, this will return 0 without throwing an exception.

template<class vec_t>
double o2scl::vector_sum_double(vec_t &data)

Compute the sum of all the elements of a vector of double-precision numbers.

If the vector has zero size, this will return 0 without calling the error handler.