Inheritance diagram for std::valarray< Type >:
Public Member Functions | |
valarray () | |
Construct an empty array. | |
valarray (size_t) | |
Construct an array with n elements. | |
valarray (const Type &, size_t) | |
Construct an array with n elements initialized to t. | |
valarray (const Type *__restrict__, size_t) | |
Construct an array initialized to the first n elements of t. | |
valarray (const valarray &) | |
Copy constructor. | |
valarray (const slice_array< Type > &) | |
Construct an array with the same size and values in sa. | |
valarray (const gslice_array< Type > &) | |
Construct an array with the same size and values in ga. | |
valarray (const mask_array< Type > &) | |
Construct an array with the same size and values in ma. | |
valarray (const indirect_array< Type > &) | |
Construct an array with the same size and values in ia. | |
valarray< Type > & | operator= (const valarray< Type > &) |
Assign elements to an array. | |
valarray< Type > & | operator= (const Type &) |
Assign elements to a value. | |
valarray< Type > & | operator= (const slice_array< Type > &) |
Assign elements to an array subset. | |
valarray< Type > & | operator= (const gslice_array< Type > &) |
Assign elements to an array subset. | |
valarray< Type > & | operator= (const mask_array< Type > &) |
Assign elements to an array subset. | |
valarray< Type > & | operator= (const indirect_array< Type > &) |
Assign elements to an array subset. | |
Type & | operator[] (size_t) |
Expr< SClos< ValArray, Type >, Type > | operator[] (slice) const |
Return an array subset. | |
slice_array< Type > | operator[] (slice) |
Return a reference to an array subset. | |
Expr< GClos< ValArray, Type >, Type > | operator[] (const gslice &) const |
Return an array subset. | |
gslice_array< Type > | operator[] (const gslice &) |
Return a reference to an array subset. | |
valarray< Type > | operator[] (const valarray< bool > &) const |
Return an array subset. | |
mask_array< Type > | operator[] (const valarray< bool > &) |
Return a reference to an array subset. | |
Expr< IClos< ValArray, Type >, Type > | operator[] (const valarray< size_t > &) const |
Return an array subset. | |
indirect_array< Type > | operator[] (const valarray< size_t > &) |
Return a reference to an array subset. | |
UnaryOp< __unary_plus >::Rt | operator+ () const |
Return a new valarray by applying unary + to each element. | |
UnaryOp< negate >::Rt | operator- () const |
Return a new valarray by applying unary - to each element. | |
UnaryOp< __bitwise_not >::Rt | operator~ () const |
Return a new valarray by applying unary ~ to each element. | |
UnaryOp< __logical_not >::Rt | operator! () const |
Return a new valarray by applying unary ! to each element. | |
valarray< Type > & | operator *= (const Type &) |
Multiply each element of array by t. | |
valarray< Type > & | operator/= (const Type &) |
Divide each element of array by t. | |
valarray< Type > & | operator%= (const Type &) |
Set each element e of array to e % t. | |
valarray< Type > & | operator+= (const Type &) |
Add t to each element of array. | |
valarray< Type > & | operator-= (const Type &) |
Subtract t to each element of array. | |
valarray< Type > & | operator^= (const Type &) |
Set each element e of array to e ^ t. | |
valarray< Type > & | operator &= (const Type &) |
Set each element e of array to e & t. | |
valarray< Type > & | operator|= (const Type &) |
Set each element e of array to e | t. | |
valarray< Type > & | operator<<= (const Type &) |
Left shift each element e of array by t bits. | |
valarray< Type > & | operator>>= (const Type &) |
Right shift each element e of array by t bits. | |
valarray< Type > & | operator *= (const valarray< Type > &) |
Multiply elements of array by corresponding elements of v. | |
valarray< Type > & | operator/= (const valarray< Type > &) |
Divide elements of array by corresponding elements of v. | |
valarray< Type > & | operator%= (const valarray< Type > &) |
Modulo elements of array by corresponding elements of v. | |
valarray< Type > & | operator+= (const valarray< Type > &) |
Add corresponding elements of v to elements of array. | |
valarray< Type > & | operator-= (const valarray< Type > &) |
Subtract corresponding elements of v from elements of array. | |
valarray< Type > & | operator^= (const valarray< Type > &) |
Logical xor corresponding elements of v with elements of array. | |
valarray< Type > & | operator|= (const valarray< Type > &) |
Logical or corresponding elements of v with elements of array. | |
valarray< Type > & | operator &= (const valarray< Type > &) |
Logical and corresponding elements of v with elements of array. | |
valarray< Type > & | operator<<= (const valarray< Type > &) |
Left shift elements of array by corresponding elements of v. | |
valarray< Type > & | operator>>= (const valarray< Type > &) |
Right shift elements of array by corresponding elements of v. | |
size_t | size () const |
Return the number of elements in array. | |
Type | sum () const |
Return the sum of all elements in the array. | |
Type | min () const |
Return the minimum element using operator<(). | |
Type | max () const |
Return the maximum element using operator<(). | |
valarray< Type > | shift (int) const |
Return a shifted array. | |
valarray< Type > | cshift (int) const |
Return a rotated array. | |
Expr< ValFunClos< ValArray, Type >, Type > | apply (Type func(Type)) const |
Apply a function to the array. | |
Expr< RefFunClos< ValArray, Type >, Type > | apply (Type func(const Type &)) const |
Apply a function to the array. | |
void | resize (size_t size, Type c=Type()) |
Resize array. |
A valarray is an array that provides constraints intended to allow for effective optimization of numeric array processing by reducing the aliasing that can result from pointer representations. It represents a one-dimensional array from which different multidimensional subsets can be accessed and modified.
Tp | Type of object in the array. |
Definition at line 110 of file valarray.
|
Construct an empty array.
|
|
Construct an array with n elements.
|
|
Construct an array with n elements initialized to t.
|
|
Construct an array initialized to the first n elements of t.
|
|
Copy constructor.
|
|
Construct an array with the same size and values in sa.
|
|
Construct an array with the same size and values in ga.
|
|
Construct an array with the same size and values in ma.
|
|
Construct an array with the same size and values in ia.
|
|
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 is the same size as this one.
|
|
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 is the same size as this one.
|
|
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 is 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.
|
|
Return the maximum element using operator<().
Definition at line 870 of file valarray. References std::max_element(). |
|
Return the minimum element using operator<().
Definition at line 862 of file valarray. References std::min_element(). |
|
Logical and corresponding elements of v with elements of array.
|
|
Set each element e of array to e & t.
|
|
Multiply elements of array by corresponding elements of v.
|
|
Multiply each element of array by t.
|
|
Return a new valarray by applying unary ! to each element.
|
|
Modulo elements of array by corresponding elements of v.
|
|
Set each element e of array to e % t.
|
|
Return a new valarray by applying unary + to each element.
|
|
Add corresponding elements of v to elements of array.
|
|
Add t to each element of array.
|
|
Return a new valarray by applying unary - to each element.
|
|
Subtract corresponding elements of v from elements of array.
|
|
Subtract t to each element of array.
|
|
Divide elements of array by corresponding elements of v.
|
|
Divide each element of array by t.
|
|
Left shift elements of array by corresponding elements of v.
|
|
Left shift each element e of array by t bits.
|
|
Assign elements to an array subset. Assign elements of array to values in ia. Results are undefined if ia is not the same size as this array.
|
|
Assign elements to an array subset. Assign elements of array to values in ma. Results are undefined if ma is not the same size as this array.
|
|
Assign elements to an array subset. Assign elements of array to values in ga. Results are undefined if ga is not the same size as this array.
|
|
Assign elements to an array subset. Assign elements of array to values in sa. Results are undefined if sa is not the same size as this array.
|
|
Assign elements to a value. Assign all elements of array to t.
|
|
Assign elements to an array. Assign elements of array to values in v. Results are undefined if v is not the same size as this array.
|
|
Right shift elements of array by corresponding elements of v.
|
|
Right shift each element e of array by t bits.
|
|
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.
Definition at line 768 of file valarray. References std::valarray< Type >::size(). |
|
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.
|
|
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.
|
|
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.
Definition at line 737 of file valarray. References std::valarray< Type >::size(). |
|
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 is the size of the input gslice.
|
|
Return an array subset. Returns a slice_array referencing the elements of the array indicated by the slice argument.
|
|
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 is the size of the input slice.
|
|
Return an array subset. Returns a new valarray containing the elements of the array indicated by the slice argument. The new valarray is the size of the input slice.
|
|
Return a reference to the i'th array element.
|
|
Logical xor corresponding elements of v with elements of array.
|
|
Set each element e of array to e ^ t.
|
|
Logical or corresponding elements of v with elements of array.
|
|
Set each element e of array to e | t.
|
|
Return a new valarray by applying unary ~ to each element.
|
|
Resize array. Resize this array to be size and set all elements to c. All references and iterators are invalidated.
|
|
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 is the same size as the current one. New elements without a value are set to 0. Elements whos 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.
|
|
Return the number of elements in array.
Definition at line 776 of file valarray. Referenced by std::valarray< Type >::operator[](). |
|
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. |