libstdc++
Numeric Arrays
Collaboration diagram for Numeric Arrays:

Classes

Defines

Functions


Detailed Description

Classes and functions for representing and manipulating arrays of elements.


Function Documentation

std::gslice::gslice ( ) [inline]

Construct an empty slice.

Definition at line 149 of file gslice.h.

std::gslice::gslice ( size_t  __o,
const valarray< size_t > &  __l,
const valarray< size_t > &  __s 
) [inline]

Construct a slice.

Constructs a slice with as many dimensions as the length of the l and s arrays.

Parameters:
oOffset in array of first element.
lArray of dimension lengths.
sArray of dimension strides between array elements.

Definition at line 153 of file gslice.h.

std::gslice::gslice ( const gslice __g) [inline]

Copy constructor.

Definition at line 158 of file gslice.h.

std::slice::slice ( ) [inline]

Construct an empty slice.

Definition at line 91 of file slice_array.h.

std::slice::slice ( size_t  __o,
size_t  __d,
size_t  __s 
) [inline]

Construct a slice.

Parameters:
oOffset in array of first element.
dNumber of elements in slice.
sStride between array elements.

Definition at line 95 of file slice_array.h.

std::valarray::valarray ( ) [inline]

Construct an empty array.

Definition at line 585 of file valarray.

std::valarray::valarray ( size_t  __n) [inline, explicit]

Construct an array with n elements.

Definition at line 589 of file valarray.

std::valarray::valarray ( const _Tp &  __t,
size_t  __n 
) [inline]

Construct an array with n elements initialized to t.

Definition at line 595 of file valarray.

std::valarray::valarray ( const slice_array< _Tp > &  __sa) [inline]

Construct an array with the same size and values in sa.

Definition at line 617 of file valarray.

std::valarray::valarray ( const gslice_array< _Tp > &  __ga) [inline]

Construct an array with the same size and values in ga.

Definition at line 626 of file valarray.

std::valarray::valarray ( const mask_array< _Tp > &  __ma) [inline]

Construct an array with the same size and values in ma.

Definition at line 637 of file valarray.

std::valarray::valarray ( const indirect_array< _Tp > &  __ia) [inline]

Construct an array with the same size and values in ia.

Definition at line 646 of file valarray.

std::valarray::valarray ( initializer_list< _Tp >  __l) [inline]

Construct an array with an initializer_list of values.

Definition at line 656 of file valarray.

std::gslice::~gslice ( ) [inline]

Destructor.

Definition at line 163 of file gslice.h.

_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > std::valarray::apply ( _Tp   func_Tp) const [inline]

Apply a function to the array.

Returns a new valarray with elements assigned to the result of applying func to the corresponding element of this array. The new array has the same size as this one.

Parameters:
funcFunction of Tp returning Tp to apply.
Returns:
New valarray with transformed elements.

Definition at line 979 of file valarray.

_Expr< _RefFunClos< _ValArray, _Tp >, _Tp > std::valarray::apply ( _Tp   funcconst _Tp &) const [inline]

Apply a function to the array.

Returns a new valarray with elements assigned to the result of applying func to the corresponding element of this array. The new array has the same size as this one.

Parameters:
funcFunction of const Tp& returning Tp to apply.
Returns:
New valarray with transformed elements.

Definition at line 987 of file valarray.

template<class _Tp >
_Tp* std::begin ( valarray< _Tp > &  __va) [inline]

Return an iterator pointing to the first element of the valarray.

Parameters:
vavalarray.

Definition at line 1126 of file valarray.

template<class _Tp >
const _Tp* std::begin ( const valarray< _Tp > &  __va) [inline]

Return an iterator pointing to the first element of the const valarray.

Parameters:
vavalarray.

Definition at line 1136 of file valarray.

valarray< _Tp > std::valarray::cshift ( int  __n) const [inline]

Return a rotated array.

A new valarray is constructed as a copy of this array with elements in shifted positions. For an element with index i, the new position is (i - n) % size(). The new valarray has the same size as the current one. Elements that are shifted beyond the array bounds are shifted into the other end of the array. No elements are lost.

Positive arguments shift toward index 0, wrapping around the top. Negative arguments shift towards the top, wrapping around to 0.

Parameters:
nNumber of element positions to rotate.
Returns:
New valarray with elements in shifted positions.

Definition at line 905 of file valarray.

template<class _Tp >
_Tp* std::end ( valarray< _Tp > &  __va) [inline]

Return an iterator pointing to one past the last element of the valarray.

Parameters:
vavalarray.

Definition at line 1146 of file valarray.

template<class _Tp >
const _Tp* std::end ( const valarray< _Tp > &  __va) [inline]

Return an iterator pointing to one past the last element of the const valarray.

Parameters:
vavalarray.

Definition at line 1156 of file valarray.

_Tp std::valarray::max ( ) const [inline]

Return the maximum element using operator<().

Definition at line 971 of file valarray.

References std::max_element().

_Tp std::valarray::min ( ) const [inline]

Return the minimum element using operator<().

Definition at line 963 of file valarray.

References std::min_element().

valarray< _Tp >::template _UnaryOp< __logical_not >::_Rt std::valarray::operator! ( ) const [inline]

Return a new valarray by applying unary ! to each element.

Definition at line 1006 of file valarray.

void std::gslice_array::operator%= ( const valarray< _Tp > &  __v) const [inline]

Modulo slice elements by corresponding elements of v.

Definition at line 203 of file gslice_array.h.

void std::mask_array::operator%= ( const valarray< _Tp > &  __v) const [inline]

Modulo slice elements by corresponding elements of v.

Definition at line 193 of file mask_array.h.

void std::indirect_array::operator%= ( const valarray< _Tp > &  __v) const [inline]

Modulo slice elements by corresponding elements of v.

Definition at line 197 of file indirect_array.h.

void std::slice_array::operator%= ( const valarray< _Tp > &  __v) const [inline]

Modulo slice elements by corresponding elements of v.

Definition at line 259 of file slice_array.h.

valarray< _Tp > & std::valarray::operator%= ( const _Tp &  __t) [inline]

Set each element e of array to e % t.

Definition at line 1033 of file valarray.

valarray< _Tp > & std::valarray::operator%= ( const valarray< _Tp > &  __v) [inline]

Modulo elements of array by corresponding elements of v.

Definition at line 1033 of file valarray.

void std::gslice_array::operator&= ( const valarray< _Tp > &  __v) const [inline]

Logical and slice elements with corresponding elements of v.

Definition at line 207 of file gslice_array.h.

void std::mask_array::operator&= ( const valarray< _Tp > &  __v) const [inline]

Logical and slice elements with corresponding elements of v.

Definition at line 197 of file mask_array.h.

void std::indirect_array::operator&= ( const valarray< _Tp > &  __v) const [inline]

Logical and slice elements with corresponding elements of v.

Definition at line 201 of file indirect_array.h.

void std::slice_array::operator&= ( const valarray< _Tp > &  __v) const [inline]

Logical and slice elements with corresponding elements of v.

Definition at line 263 of file slice_array.h.

valarray< _Tp > & std::valarray::operator&= ( const _Tp &  __t) [inline]

Set each element e of array to e & t.

Definition at line 1035 of file valarray.

valarray< _Tp > & std::valarray::operator&= ( const valarray< _Tp > &  __v) [inline]

Logical and corresponding elements of v with elements of array.

Definition at line 1035 of file valarray.

void std::gslice_array::operator*= ( const valarray< _Tp > &  __v) const [inline]

Multiply slice elements by corresponding elements of v.

Definition at line 201 of file gslice_array.h.

void std::mask_array::operator*= ( const valarray< _Tp > &  __v) const [inline]

Multiply slice elements by corresponding elements of v.

Definition at line 191 of file mask_array.h.

void std::indirect_array::operator*= ( const valarray< _Tp > &  __v) const [inline]

Multiply slice elements by corresponding elements of v.

Definition at line 195 of file indirect_array.h.

void std::slice_array::operator*= ( const valarray< _Tp > &  __v) const [inline]

Multiply slice elements by corresponding elements of v.

Definition at line 257 of file slice_array.h.

valarray< _Tp > & std::valarray::operator*= ( const _Tp &  __t) [inline]

Multiply each element of array by t.

Definition at line 1031 of file valarray.

valarray< _Tp > & std::valarray::operator*= ( const valarray< _Tp > &  __v) [inline]

Multiply elements of array by corresponding elements of v.

Definition at line 1031 of file valarray.

valarray< _Tp >::template _UnaryOp< __unary_plus >::_Rt std::valarray::operator+ ( ) const [inline]

Return a new valarray by applying unary + to each element.

Definition at line 1003 of file valarray.

void std::gslice_array::operator+= ( const valarray< _Tp > &  __v) const [inline]

Add corresponding elements of v to slice elements.

Definition at line 204 of file gslice_array.h.

void std::mask_array::operator+= ( const valarray< _Tp > &  __v) const [inline]

Add corresponding elements of v to slice elements.

Definition at line 194 of file mask_array.h.

void std::indirect_array::operator+= ( const valarray< _Tp > &  __v) const [inline]

Add corresponding elements of v to slice elements.

Definition at line 198 of file indirect_array.h.

void std::slice_array::operator+= ( const valarray< _Tp > &  __v) const [inline]

Add corresponding elements of v to slice elements.

Definition at line 260 of file slice_array.h.

valarray< _Tp > & std::valarray::operator+= ( const _Tp &  __t) [inline]

Add t to each element of array.

Definition at line 1029 of file valarray.

valarray< _Tp > & std::valarray::operator+= ( const valarray< _Tp > &  __v) [inline]

Add corresponding elements of v to elements of array.

Definition at line 1029 of file valarray.

valarray< _Tp >::template _UnaryOp< __negate >::_Rt std::valarray::operator- ( ) const [inline]

Return a new valarray by applying unary - to each element.

Definition at line 1004 of file valarray.

void std::gslice_array::operator-= ( const valarray< _Tp > &  __v) const [inline]

Subtract corresponding elements of v from slice elements.

Definition at line 205 of file gslice_array.h.

void std::mask_array::operator-= ( const valarray< _Tp > &  __v) const [inline]

Subtract corresponding elements of v from slice elements.

Definition at line 195 of file mask_array.h.

void std::indirect_array::operator-= ( const valarray< _Tp > &  __v) const [inline]

Subtract corresponding elements of v from slice elements.

Definition at line 199 of file indirect_array.h.

void std::slice_array::operator-= ( const valarray< _Tp > &  __v) const [inline]

Subtract corresponding elements of v from slice elements.

Definition at line 261 of file slice_array.h.

valarray< _Tp > & std::valarray::operator-= ( const _Tp &  __t) [inline]

Subtract t to each element of array.

Definition at line 1030 of file valarray.

valarray< _Tp > & std::valarray::operator-= ( const valarray< _Tp > &  __v) [inline]

Subtract corresponding elements of v from elements of array.

Definition at line 1030 of file valarray.

void std::gslice_array::operator/= ( const valarray< _Tp > &  __v) const [inline]

Divide slice elements by corresponding elements of v.

Definition at line 202 of file gslice_array.h.

void std::mask_array::operator/= ( const valarray< _Tp > &  __v) const [inline]

Divide slice elements by corresponding elements of v.

Definition at line 192 of file mask_array.h.

void std::indirect_array::operator/= ( const valarray< _Tp > &  __v) const [inline]

Divide slice elements by corresponding elements of v.

Definition at line 196 of file indirect_array.h.

void std::slice_array::operator/= ( const valarray< _Tp > &  __v) const [inline]

Divide slice elements by corresponding elements of v.

Definition at line 258 of file slice_array.h.

valarray< _Tp > & std::valarray::operator/= ( const _Tp &  __t) [inline]

Divide each element of array by t.

Definition at line 1032 of file valarray.

valarray< _Tp > & std::valarray::operator/= ( const valarray< _Tp > &  __v) [inline]

Divide elements of array by corresponding elements of v.

Definition at line 1032 of file valarray.

void std::gslice_array::operator<<= ( const valarray< _Tp > &  __v) const [inline]

Left shift slice elements by corresponding elements of v.

Definition at line 209 of file gslice_array.h.

void std::mask_array::operator<<= ( const valarray< _Tp > &  __v) const [inline]

Left shift slice elements by corresponding elements of v.

Definition at line 199 of file mask_array.h.

void std::indirect_array::operator<<= ( const valarray< _Tp > &  __v) const [inline]

Left shift slice elements by corresponding elements of v.

Definition at line 203 of file indirect_array.h.

void std::slice_array::operator<<= ( const valarray< _Tp > &  __v) const [inline]

Left shift slice elements by corresponding elements of v.

Definition at line 265 of file slice_array.h.

valarray< _Tp > & std::valarray::operator<<= ( const _Tp &  __t) [inline]

Left shift each element e of array by t bits.

Definition at line 1037 of file valarray.

valarray< _Tp > & std::valarray::operator<<= ( const valarray< _Tp > &  __v) [inline]

Left shift elements of array by corresponding elements of v.

Definition at line 1037 of file valarray.

void std::gslice_array::operator= ( const valarray< _Tp > &  __v) const [inline]

Assign slice elements to corresponding elements of v.

Definition at line 167 of file gslice_array.h.

References std::valarray::size().

void std::indirect_array::operator= ( const valarray< _Tp > &  __v) const [inline]

Assign slice elements to corresponding elements of v.

Definition at line 169 of file indirect_array.h.

gslice & std::gslice::operator= ( const gslice __g) [inline]

Assignment operator.

Definition at line 170 of file gslice.h.

void std::gslice_array::operator= ( const _Tp &  __t) const [inline]

Assign all slice elements to t.

Definition at line 159 of file gslice_array.h.

void std::mask_array::operator= ( const _Tp &  __t) const [inline]

Assign all slice elements to t.

Definition at line 159 of file mask_array.h.

void std::indirect_array::operator= ( const _Tp &  __t) const [inline]

Assign all slice elements to t.

Definition at line 164 of file indirect_array.h.

void std::slice_array::operator= ( const valarray< _Tp > &  __v) const [inline]

Assign slice elements to corresponding elements of v.

Definition at line 230 of file slice_array.h.

void std::slice_array::operator= ( const _Tp &  __t) const [inline]

Assign all slice elements to t.

Definition at line 225 of file slice_array.h.

valarray< _Tp > & std::valarray::operator= ( const valarray< _Tp > &  __v) [inline]

Assign elements to an array.

Assign elements of array to values in v. Results are undefined if v does not have the same size as this array.

Parameters:
vValarray to get values from.

Definition at line 677 of file valarray.

valarray< _Tp > & std::valarray::operator= ( const _Tp &  __t) [inline]

Assign elements to a value.

Assign all elements of array to t.

Parameters:
tValue for elements.

Definition at line 725 of file valarray.

valarray< _Tp > & std::valarray::operator= ( const slice_array< _Tp > &  __sa) [inline]

Assign elements to an array subset.

Assign elements of array to values in sa. Results are undefined if sa does not have the same size as this array.

Parameters:
saArray slice to get values from.

Definition at line 733 of file valarray.

valarray< _Tp > & std::valarray::operator= ( const gslice_array< _Tp > &  __ga) [inline]

Assign elements to an array subset.

Assign elements of array to values in ga. Results are undefined if ga does not have the same size as this array.

Parameters:
gaArray slice to get values from.

Definition at line 743 of file valarray.

References std::valarray::size().

valarray< _Tp > & std::valarray::operator= ( const mask_array< _Tp > &  __ma) [inline]

Assign elements to an array subset.

Assign elements of array to values in ma. Results are undefined if ma does not have the same size as this array.

Parameters:
maArray slice to get values from.

Definition at line 753 of file valarray.

valarray< _Tp > & std::valarray::operator= ( const indirect_array< _Tp > &  __ia) [inline]

Assign elements to an array subset.

Assign elements of array to values in ia. Results are undefined if ia does not have the same size as this array.

Parameters:
iaArray slice to get values from.

Definition at line 763 of file valarray.

valarray< _Tp > & std::valarray::operator= ( initializer_list< _Tp >  __l) [inline]

Assign elements to an initializer_list.

Assign elements of array to values in l. Results are undefined if l does not have the same size as this array.

Parameters:
linitializer_list to get values from.

Definition at line 701 of file valarray.

void std::gslice_array::operator>>= ( const valarray< _Tp > &  __v) const [inline]

Right shift slice elements by corresponding elements of v.

Definition at line 210 of file gslice_array.h.

void std::mask_array::operator>>= ( const valarray< _Tp > &  __v) const [inline]

Right shift slice elements by corresponding elements of v.

Definition at line 200 of file mask_array.h.

void std::indirect_array::operator>>= ( const valarray< _Tp > &  __v) const [inline]

Right shift slice elements by corresponding elements of v.

Definition at line 204 of file indirect_array.h.

void std::slice_array::operator>>= ( const valarray< _Tp > &  __v) const [inline]

Right shift slice elements by corresponding elements of v.

Definition at line 266 of file slice_array.h.

valarray< _Tp > & std::valarray::operator>>= ( const _Tp &  __t) [inline]

Right shift each element e of array by t bits.

Definition at line 1038 of file valarray.

valarray< _Tp > & std::valarray::operator>>= ( const valarray< _Tp > &  __v) [inline]

Right shift elements of array by corresponding elements of v.

Definition at line 1038 of file valarray.

_Tp & std::valarray::operator[] ( size_t  __i) [inline]

Return a reference to the i'th array element.

Parameters:
iIndex of element to return.
Returns:
Reference to the i'th element.

Definition at line 556 of file valarray.

_Expr< _SClos< _ValArray, _Tp >, _Tp > std::valarray::operator[] ( slice  __s) const [inline]

Return an array subset.

Returns a new valarray containing the elements of the array indicated by the slice argument. The new valarray has the same size as the input slice.

See also:
slice.
Parameters:
sThe source slice.
Returns:
New valarray containing elements in s.

Definition at line 782 of file valarray.

slice_array< _Tp > std::valarray::operator[] ( slice  __s) [inline]

Return a reference to an array subset.

Returns a new valarray containing the elements of the array indicated by the slice argument. The new valarray has the same size as the input slice.

See also:
slice.
Parameters:
sThe source slice.
Returns:
New valarray containing elements in s.

Definition at line 790 of file valarray.

_Expr< _GClos< _ValArray, _Tp >, _Tp > std::valarray::operator[] ( const gslice __gs) const [inline]

Return an array subset.

Returns a slice_array referencing the elements of the array indicated by the slice argument.

See also:
gslice.
Parameters:
sThe source slice.
Returns:
Slice_array referencing elements indicated by s.

Definition at line 795 of file valarray.

gslice_array< _Tp > std::valarray::operator[] ( const gslice __gs) [inline]

Return a reference to an array subset.

Returns a new valarray containing the elements of the array indicated by the gslice argument. The new valarray has the same size as the input gslice.

See also:
gslice.
Parameters:
sThe source gslice.
Returns:
New valarray containing elements in s.

Definition at line 804 of file valarray.

valarray< _Tp > std::valarray::operator[] ( const valarray< bool > &  __m) const [inline]

Return an array subset.

Returns a new valarray containing the elements of the array indicated by the argument. The input is a valarray of bool which represents a bitmask indicating which elements should be copied into the new valarray. Each element of the array is added to the return valarray if the corresponding element of the argument is true.

Parameters:
mThe valarray bitmask.
Returns:
New valarray containing elements indicated by m.

Definition at line 812 of file valarray.

mask_array< _Tp > std::valarray::operator[] ( const valarray< bool > &  __m) [inline]

Return a reference to an array subset.

Returns a new mask_array referencing the elements of the array indicated by the argument. The input is a valarray of bool which represents a bitmask indicating which elements are part of the subset. Elements of the array are part of the subset if the corresponding element of the argument is true.

Parameters:
mThe valarray bitmask.
Returns:
New valarray containing elements indicated by m.

Definition at line 824 of file valarray.

_Expr< _IClos< _ValArray, _Tp >, _Tp > std::valarray::operator[] ( const valarray< size_t > &  __i) const [inline]

Return an array subset.

Returns a new valarray containing the elements of the array indicated by the argument. The elements in the argument are interpreted as the indices of elements of this valarray to copy to the return valarray.

Parameters:
iThe valarray element index list.
Returns:
New valarray containing elements in s.

Definition at line 835 of file valarray.

indirect_array< _Tp > std::valarray::operator[] ( const valarray< size_t > &  __i) [inline]

Return a reference to an array subset.

Returns an indirect_array referencing the elements of the array indicated by the argument. The elements in the argument are interpreted as the indices of elements of this valarray to include in the subset. The returned indirect_array refers to these elements.

Parameters:
iThe valarray element index list.
Returns:
Indirect_array referencing elements in i.

Definition at line 843 of file valarray.

References std::valarray::size().

void std::gslice_array::operator^= ( const valarray< _Tp > &  __v) const [inline]

Logical xor slice elements with corresponding elements of v.

Definition at line 206 of file gslice_array.h.

void std::mask_array::operator^= ( const valarray< _Tp > &  __v) const [inline]

Logical xor slice elements with corresponding elements of v.

Definition at line 196 of file mask_array.h.

void std::indirect_array::operator^= ( const valarray< _Tp > &  __v) const [inline]

Logical xor slice elements with corresponding elements of v.

Definition at line 200 of file indirect_array.h.

void std::slice_array::operator^= ( const valarray< _Tp > &  __v) const [inline]

Logical xor slice elements with corresponding elements of v.

Definition at line 262 of file slice_array.h.

valarray< _Tp > & std::valarray::operator^= ( const _Tp &  __t) [inline]

Set each element e of array to e ^ t.

Definition at line 1034 of file valarray.

valarray< _Tp > & std::valarray::operator^= ( const valarray< _Tp > &  __v) [inline]

Logical xor corresponding elements of v with elements of array.

Definition at line 1034 of file valarray.

void std::gslice_array::operator|= ( const valarray< _Tp > &  __v) const [inline]

Logical or slice elements with corresponding elements of v.

Definition at line 208 of file gslice_array.h.

void std::mask_array::operator|= ( const valarray< _Tp > &  __v) const [inline]

Logical or slice elements with corresponding elements of v.

Definition at line 198 of file mask_array.h.

void std::indirect_array::operator|= ( const valarray< _Tp > &  __v) const [inline]

Logical or slice elements with corresponding elements of v.

Definition at line 202 of file indirect_array.h.

void std::slice_array::operator|= ( const valarray< _Tp > &  __v) const [inline]

Logical or slice elements with corresponding elements of v.

Definition at line 264 of file slice_array.h.

valarray< _Tp > & std::valarray::operator|= ( const _Tp &  __t) [inline]

Set each element e of array to e | t.

Definition at line 1036 of file valarray.

valarray< _Tp > & std::valarray::operator|= ( const valarray< _Tp > &  __v) [inline]

Logical or corresponding elements of v with elements of array.

Definition at line 1036 of file valarray.

valarray< _Tp >::template _UnaryOp< __bitwise_not >::_Rt std::valarray::operator~ ( ) const [inline]

Return a new valarray by applying unary ~ to each element.

Definition at line 1005 of file valarray.

void std::valarray::resize ( size_t  __size,
_Tp  __c = _Tp() 
) [inline]

Resize array.

Resize this array to size and set all elements to c. All references and iterators are invalidated.

Parameters:
sizeNew array size.
cNew value for all elements.

Definition at line 946 of file valarray.

valarray< _Tp > std::valarray::shift ( int  __n) const [inline]

Return a shifted array.

A new valarray is constructed as a copy of this array with elements in shifted positions. For an element with index i, the new position is i - n. The new valarray has the same size as the current one. New elements without a value are set to 0. Elements whose new position is outside the bounds of the array are discarded.

Positive arguments shift toward index 0, discarding elements [0, n). Negative arguments discard elements from the top of the array.

Parameters:
nNumber of element positions to shift.
Returns:
New valarray with elements in shifted positions.

Definition at line 864 of file valarray.

size_t std::slice::size ( ) const [inline]

Return size of slice.

Definition at line 103 of file slice_array.h.

valarray< size_t > std::gslice::size ( ) const [inline]

Return array of sizes of slice dimensions.

Definition at line 139 of file gslice.h.

size_t std::valarray::size ( ) const [inline]

Return the number of elements in array.

Definition at line 851 of file valarray.

Referenced by std::gslice_array::operator=(), std::valarray::operator=(), and std::valarray::operator[]().

size_t std::slice::start ( ) const [inline]

Return array offset of first slice element.

Definition at line 99 of file slice_array.h.

size_t std::gslice::start ( ) const [inline]

Return array offset of first slice element.

Definition at line 135 of file gslice.h.

size_t std::slice::stride ( ) const [inline]

Return array stride of slice.

Definition at line 107 of file slice_array.h.

valarray< size_t > std::gslice::stride ( ) const [inline]

Return array of array strides for each dimension.

Definition at line 143 of file gslice.h.

_Tp std::valarray::sum ( ) const [inline]

Return the sum of all elements in the array.

Accumulates the sum of all elements into a Tp using +=. The order of adding the elements is unspecified.

Definition at line 856 of file valarray.