Namespaces
Variants
Views
Actions

std::abs(std::valarray)

From cppreference.com
< cpp‎ | numeric‎ | valarray
Revision as of 12:00, 19 March 2012 by P12bot (Talk | contribs)

Template:cpp/numeric/valarray/sidebar

Defined in header <valarray>
template< class T >
valarray<T> abs( const valarray<T>& va );

Computes absolute value of each element in the value array. This is done by applying Template:cpp (unqualified) function.

Contents

Parameters

va - value array to apply the operation to

Return value

Value array containing absolute values of the values in va.

Notes

Template:cpp/numeric/valarray/notes

Possible implementation

Template:eq fun cpp

Example

Template:example cpp

See also

Template:cpp/numeric/complex/dcl list abs
computes absolute value of an integral value (|x|)
(function)
absolute value of a floating point value (|x|)
(function)