Numeric Arrays
[Numerics]

Collaboration diagram for Numeric Arrays:

Classes

Defines

Functions


Detailed Description

Classes and functions for representing and manipulating arrays of elements.

Function Documentation

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

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:
func Function of const Tp& returning Tp to apply.
Returns:
New valarray with transformed elements.

Definition at line 951 of file valarray.

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

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:
func Function of Tp returning Tp to apply.
Returns:
New valarray with transformed elements.

Definition at line 943 of file valarray.

template<class _Tp >
valarray< _Tp > std::valarray< _Tp >::cshift ( int  __n  )  const [inline, inherited]

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:
n Number of element positions to rotate.
Returns:
New valarray with elements in shifted positions.

Definition at line 869 of file valarray.

References std::valarray< _Tp >::_M_data, and std::valarray< _Tp >::_M_size.

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

Copy constructor.

Definition at line 156 of file gslice.h.

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

Construct a slice.

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

Parameters:
o Offset in array of first element.
l Array of dimension lengths.
s Array of dimension strides between array elements.

Definition at line 151 of file gslice.h.

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

Construct an empty slice.

Definition at line 147 of file gslice.h.

template<typename _Tp >
std::gslice_array< _Tp >::gslice_array ( const gslice_array< _Tp > &  __a  )  [inline, inherited]

Copy constructor. Both slices refer to the same underlying array.

Definition at line 142 of file gslice_array.h.

template<typename _Tp >
std::indirect_array< _Tp >::indirect_array ( const indirect_array< _Tp > &  __a  )  [inline, inherited]

Copy constructor. Both slices refer to the same underlying array.

Definition at line 142 of file indirect_array.h.

template<typename _Tp >
std::mask_array< _Tp >::mask_array ( const mask_array< _Tp > &  a  )  [inline, inherited]

Copy constructor. Both slices refer to the same underlying array.

Definition at line 138 of file mask_array.h.

template<typename _Tp >
_Tp std::valarray< _Tp >::max (  )  const [inline, inherited]

Return the maximum element using operator<().

Definition at line 935 of file valarray.

References std::max_element().

template<typename _Tp >
_Tp std::valarray< _Tp >::min (  )  const [inline, inherited]

Return the minimum element using operator<().

Definition at line 927 of file valarray.

References std::min_element().

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

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

Definition at line 970 of file valarray.

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

Modulo slice elements by corresponding elements of v.

Definition at line 257 of file slice_array.h.

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

Modulo slice elements by corresponding elements of v.

Definition at line 191 of file mask_array.h.

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

Modulo slice elements by corresponding elements of v.

Definition at line 195 of file indirect_array.h.

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

Modulo slice elements by corresponding elements of v.

Definition at line 201 of file gslice_array.h.

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

Modulo elements of array by corresponding elements of v.

Definition at line 997 of file valarray.

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

Set each element e of array to e % t.

Definition at line 997 of file valarray.

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

Logical and slice elements with corresponding elements of v.

Definition at line 261 of file slice_array.h.

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

Logical and slice elements with corresponding elements of v.

Definition at line 195 of file mask_array.h.

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

Logical and slice elements with corresponding elements of v.

Definition at line 199 of file indirect_array.h.

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

Logical and slice elements with corresponding elements of v.

Definition at line 205 of file gslice_array.h.

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

Logical and corresponding elements of v with elements of array.

Definition at line 999 of file valarray.

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

Set each element e of array to e & t.

Definition at line 999 of file valarray.

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

Multiply slice elements by corresponding elements of v.

Definition at line 255 of file slice_array.h.

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

Multiply slice elements by corresponding elements of v.

Definition at line 189 of file mask_array.h.

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

Multiply slice elements by corresponding elements of v.

Definition at line 193 of file indirect_array.h.

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

Multiply slice elements by corresponding elements of v.

Definition at line 199 of file gslice_array.h.

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

Multiply elements of array by corresponding elements of v.

Definition at line 995 of file valarray.

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

Multiply each element of array by t.

Definition at line 995 of file valarray.

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

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

Definition at line 967 of file valarray.

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

Add corresponding elements of v to slice elements.

Definition at line 258 of file slice_array.h.

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

Add corresponding elements of v to slice elements.

Definition at line 192 of file mask_array.h.

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

Add corresponding elements of v to slice elements.

Definition at line 196 of file indirect_array.h.

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

Add corresponding elements of v to slice elements.

Definition at line 202 of file gslice_array.h.

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

Add corresponding elements of v to elements of array.

Definition at line 993 of file valarray.

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

Add t to each element of array.

Definition at line 993 of file valarray.

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

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

Definition at line 968 of file valarray.

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

Subtract corresponding elements of v from slice elements.

Definition at line 259 of file slice_array.h.

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

Subtract corresponding elements of v from slice elements.

Definition at line 193 of file mask_array.h.

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

Subtract corresponding elements of v from slice elements.

Definition at line 197 of file indirect_array.h.

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

Subtract corresponding elements of v from slice elements.

Definition at line 203 of file gslice_array.h.

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

Subtract corresponding elements of v from elements of array.

Definition at line 994 of file valarray.

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

Subtract t to each element of array.

Definition at line 994 of file valarray.

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

Divide slice elements by corresponding elements of v.

Definition at line 256 of file slice_array.h.

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

Divide slice elements by corresponding elements of v.

Definition at line 190 of file mask_array.h.

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

Divide slice elements by corresponding elements of v.

Definition at line 194 of file indirect_array.h.

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

Divide slice elements by corresponding elements of v.

Definition at line 200 of file gslice_array.h.

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

Divide elements of array by corresponding elements of v.

Definition at line 996 of file valarray.

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

Divide each element of array by t.

Definition at line 996 of file valarray.

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

Left shift slice elements by corresponding elements of v.

Definition at line 263 of file slice_array.h.

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

Left shift slice elements by corresponding elements of v.

Definition at line 197 of file mask_array.h.

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

Left shift slice elements by corresponding elements of v.

Definition at line 201 of file indirect_array.h.

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

Left shift slice elements by corresponding elements of v.

Definition at line 207 of file gslice_array.h.

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

Left shift elements of array by corresponding elements of v.

Definition at line 1001 of file valarray.

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

Left shift each element e of array by t bits.

Definition at line 1001 of file valarray.

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

Assign slice elements to corresponding elements of v.

Definition at line 228 of file slice_array.h.

template<typename _Tp >
void std::slice_array< _Tp >::operator= ( const _Tp &  __t  )  const [inline, inherited]

Assign all slice elements to t.

Definition at line 223 of file slice_array.h.

template<typename _Tp >
slice_array< _Tp > & std::slice_array< _Tp >::operator= ( const slice_array< _Tp > &  __a  )  [inline, inherited]

Assignment operator. Assigns slice elements to corresponding elements of a.

Definition at line 214 of file slice_array.h.

References std::slice_array< _Tp >::_M_array, std::slice_array< _Tp >::_M_stride, and std::slice_array< _Tp >::_M_sz.

template<typename _Tp >
void std::mask_array< _Tp >::operator= ( const _Tp &  __t  )  const [inline, inherited]

Assign all slice elements to t.

Definition at line 157 of file mask_array.h.

template<typename _Tp >
mask_array< _Tp > & std::mask_array< _Tp >::operator= ( const mask_array< _Tp > &  __a  )  [inline, inherited]

Assignment operator. Assigns elements to corresponding elements of a.

Definition at line 148 of file mask_array.h.

References std::mask_array< _Tp >::_M_array, and std::mask_array< _Tp >::_M_mask.

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

Assign slice elements to corresponding elements of v.

Definition at line 167 of file indirect_array.h.

template<typename _Tp >
void std::indirect_array< _Tp >::operator= ( const _Tp &  __t  )  const [inline, inherited]

Assign all slice elements to t.

Definition at line 162 of file indirect_array.h.

template<typename _Tp >
indirect_array< _Tp > & std::indirect_array< _Tp >::operator= ( const indirect_array< _Tp > &  __a  )  [inline, inherited]

Assignment operator. Assigns elements to corresponding elements of a.

Definition at line 153 of file indirect_array.h.

References std::indirect_array< _Tp >::_M_array, and std::indirect_array< _Tp >::_M_index.

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

Assign slice elements to corresponding elements of v.

Definition at line 165 of file gslice_array.h.

References std::valarray< _Tp >::size().

template<typename _Tp >
void std::gslice_array< _Tp >::operator= ( const _Tp &  __t  )  const [inline, inherited]

Assign all slice elements to t.

Definition at line 157 of file gslice_array.h.

References std::valarray< _Tp >::size().

template<typename _Tp >
gslice_array< _Tp > & std::gslice_array< _Tp >::operator= ( const gslice_array< _Tp > &  __a  )  [inline, inherited]

Assignment operator. Assigns slice elements to corresponding elements of a.

Definition at line 147 of file gslice_array.h.

References std::gslice_array< _Tp >::_M_array, std::gslice_array< _Tp >::_M_index, and std::valarray< _Tp >::size().

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

Assignment operator.

Definition at line 168 of file gslice.h.

References std::gslice::_M_index.

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

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:
ia Array slice to get values from.

Definition at line 727 of file valarray.

References std::indirect_array< _Tp >::_M_array, std::indirect_array< _Tp >::_M_index, and std::indirect_array< _Tp >::_M_sz.

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

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:
ma Array slice to get values from.

Definition at line 717 of file valarray.

References std::mask_array< _Tp >::_M_array, std::mask_array< _Tp >::_M_mask, and std::mask_array< _Tp >::_M_sz.

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

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:
ga Array slice to get values from.

Definition at line 707 of file valarray.

References std::gslice_array< _Tp >::_M_array, std::gslice_array< _Tp >::_M_index, and std::valarray< _Tp >::size().

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

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:
sa Array slice to get values from.

Definition at line 697 of file valarray.

References std::slice_array< _Tp >::_M_array, std::slice_array< _Tp >::_M_stride, and std::slice_array< _Tp >::_M_sz.

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

Assign elements to a value.

Assign all elements of array to t.

Parameters:
t Value for elements.

Definition at line 689 of file valarray.

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

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:
l initializer_list to get values from.

Definition at line 680 of file valarray.

References std::initializer_list< _E >::begin(), and std::initializer_list< _E >::size().

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

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:
v Valarray to get values from.

Definition at line 670 of file valarray.

References std::valarray< _Tp >::_M_data, and std::valarray< _Tp >::_M_size.

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

Right shift slice elements by corresponding elements of v.

Definition at line 264 of file slice_array.h.

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

Right shift slice elements by corresponding elements of v.

Definition at line 198 of file mask_array.h.

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

Right shift slice elements by corresponding elements of v.

Definition at line 202 of file indirect_array.h.

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

Right shift slice elements by corresponding elements of v.

Definition at line 208 of file gslice_array.h.

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

Right shift elements of array by corresponding elements of v.

Definition at line 1002 of file valarray.

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

Right shift each element e of array by t bits.

Definition at line 1002 of file valarray.

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

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:
i The valarray element index list.
Returns:
Indirect_array referencing elements in i.

Definition at line 807 of file valarray.

References std::valarray< _Tp >::size().

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

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:
i The valarray element index list.
Returns:
New valarray containing elements in s.

Definition at line 799 of file valarray.

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

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:
m The valarray bitmask.
Returns:
New valarray containing elements indicated by m.

Definition at line 788 of file valarray.

References std::valarray< _Tp >::size().

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

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:
m The valarray bitmask.
Returns:
New valarray containing elements indicated by m.

Definition at line 776 of file valarray.

References std::valarray< _Tp >::size().

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

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:
s The source gslice.
Returns:
New valarray containing elements in s.

Definition at line 768 of file valarray.

References std::gslice::_M_index.

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

Return an array subset.

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

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

Definition at line 759 of file valarray.

References std::gslice::_M_index.

template<typename _Tp >
slice_array< _Tp > std::valarray< _Tp >::operator[] ( slice  __s  )  [inline, inherited]

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:
s The source slice.
Returns:
New valarray containing elements in s.

Definition at line 754 of file valarray.

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

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:
s The source slice.
Returns:
New valarray containing elements in s.

Definition at line 746 of file valarray.

template<typename _Tp >
_Tp & std::valarray< _Tp >::operator[] ( size_t  __i  )  [inline, inherited]

Return a reference to the i'th array element.

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

Definition at line 552 of file valarray.

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

Logical xor slice elements with corresponding elements of v.

Definition at line 260 of file slice_array.h.

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

Logical xor slice elements with corresponding elements of v.

Definition at line 194 of file mask_array.h.

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

Logical xor slice elements with corresponding elements of v.

Definition at line 198 of file indirect_array.h.

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

Logical xor slice elements with corresponding elements of v.

Definition at line 204 of file gslice_array.h.

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

Logical xor corresponding elements of v with elements of array.

Definition at line 998 of file valarray.

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

Set each element e of array to e ^ t.

Definition at line 998 of file valarray.

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

Logical or slice elements with corresponding elements of v.

Definition at line 262 of file slice_array.h.

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

Logical or slice elements with corresponding elements of v.

Definition at line 196 of file mask_array.h.

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

Logical or slice elements with corresponding elements of v.

Definition at line 200 of file indirect_array.h.

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

Logical or slice elements with corresponding elements of v.

Definition at line 206 of file gslice_array.h.

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

Logical or corresponding elements of v with elements of array.

Definition at line 1000 of file valarray.

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

Set each element e of array to e | t.

Definition at line 1000 of file valarray.

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

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

Definition at line 969 of file valarray.

template<class _Tp>
void std::valarray< _Tp >::resize ( size_t  __size,
_Tp  __c = _Tp() 
) [inline, inherited]

Resize array.

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

Parameters:
size New array size.
c New value for all elements.

Definition at line 910 of file valarray.

template<class _Tp >
valarray< _Tp > std::valarray< _Tp >::shift ( int  __n  )  const [inline, inherited]

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:
n Number of element positions to shift.
Returns:
New valarray with elements in shifted positions.

Definition at line 828 of file valarray.

References std::valarray< _Tp >::_M_data, and std::valarray< _Tp >::_M_size.

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

Return size of slice.

Definition at line 101 of file slice_array.h.

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

Return array of sizes of slice dimensions.

Definition at line 137 of file gslice.h.

template<class _Tp >
size_t std::valarray< _Tp >::size (  )  const [inline, inherited]

Return the number of elements in array.

Definition at line 815 of file valarray.

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

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

Construct a slice.

Parameters:
o Offset in array of first element.
d Number of elements in slice.
s Stride between array elements.

Definition at line 93 of file slice_array.h.

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

Construct an empty slice.

Definition at line 89 of file slice_array.h.

template<typename _Tp >
std::slice_array< _Tp >::slice_array ( const slice_array< _Tp > &  a  )  [inline, inherited]

Copy constructor. Both slices refer to the same underlying array.

Definition at line 206 of file slice_array.h.

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

Return array offset of first slice element.

Definition at line 97 of file slice_array.h.

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

Return array offset of first slice element.

Definition at line 133 of file gslice.h.

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

Return array stride of slice.

Definition at line 105 of file slice_array.h.

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

Return array of array strides for each dimension.

Definition at line 141 of file gslice.h.

template<class _Tp >
_Tp std::valarray< _Tp >::sum (  )  const [inline, inherited]

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 820 of file valarray.

template<typename _Tp>
std::valarray< _Tp >::valarray ( initializer_list< _Tp >  __l  )  [inline, inherited]

Construct an array with an initializer_list of values.

Definition at line 649 of file valarray.

References std::initializer_list< _E >::begin(), and std::initializer_list< _E >::end().

template<typename _Tp>
std::valarray< _Tp >::valarray ( const indirect_array< _Tp > &  __ia  )  [inline, inherited]

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

Definition at line 639 of file valarray.

References std::indirect_array< _Tp >::_M_array, and std::indirect_array< _Tp >::_M_index.

template<typename _Tp>
std::valarray< _Tp >::valarray ( const mask_array< _Tp > &  __ma  )  [inline, inherited]

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

Definition at line 630 of file valarray.

References std::mask_array< _Tp >::_M_array, and std::mask_array< _Tp >::_M_mask.

template<typename _Tp>
std::valarray< _Tp >::valarray ( const gslice_array< _Tp > &  __ga  )  [inline, inherited]

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

Definition at line 619 of file valarray.

References std::gslice_array< _Tp >::_M_array, and std::gslice_array< _Tp >::_M_index.

template<typename _Tp>
std::valarray< _Tp >::valarray ( const slice_array< _Tp > &  __sa  )  [inline, inherited]

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

Definition at line 610 of file valarray.

References std::slice_array< _Tp >::_M_array, std::slice_array< _Tp >::_M_stride, and std::slice_array< _Tp >::_M_sz.

template<typename _Tp>
std::valarray< _Tp >::valarray ( const valarray< _Tp > &  __v  )  [inline, inherited]

Copy constructor.

Definition at line 603 of file valarray.

References std::valarray< _Tp >::_M_data.

template<typename _Tp>
std::valarray< _Tp >::valarray ( const _Tp &  __t,
size_t  __n 
) [inline, inherited]

Construct an array with n elements initialized to t.

Definition at line 588 of file valarray.

template<typename _Tp >
std::valarray< _Tp >::valarray ( size_t  __n  )  [inline, explicit, inherited]

Construct an array with n elements.

Definition at line 582 of file valarray.

template<typename _Tp >
std::valarray< _Tp >::valarray (  )  [inline, inherited]

Construct an empty array.

Definition at line 578 of file valarray.

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

Destructor.

Definition at line 161 of file gslice.h.


Generated on Tue Apr 21 13:13:40 2009 for libstdc++ by  doxygen 1.5.8