std::valarray::sum

From Cppreference

Jump to: navigation, search
T sum() const;

Computes the sum of the elements.

The function can be used only if operator+= is defined for type T.

Contents

[edit] Parameters

(none)

[edit] Return value

The sum of the elements.

[edit] Example

[edit] See also

applies a function to every element of a valarray
(public member function)