.TH "std::valarray< _Tp >" 3cxx "Mon May 22 2017" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::valarray< _Tp > \- Smart array designed to support numeric processing\&. .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "typedef _Tp \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBvalarray\fP ()" .br .RI "Construct an empty array\&. " .ti -1c .RI "\fBvalarray\fP (size_t)" .br .RI "Construct an array with \fIn\fP elements\&. " .ti -1c .RI "\fBvalarray\fP (const _Tp &, size_t)" .br .RI "Construct an array with \fIn\fP elements initialized to \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP (const _Tp *__restrict__, size_t)" .br .RI "Construct an array initialized to the first \fIn\fP elements of \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP (const \fBvalarray\fP &)" .br .RI "Copy constructor\&. " .ti -1c .RI "\fBvalarray\fP (\fBvalarray\fP &&) noexcept" .br .RI "Move constructor\&. " .ti -1c .RI "\fBvalarray\fP (const \fBslice_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIsa\fP\&. " .ti -1c .RI "\fBvalarray\fP (const \fBgslice_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIga\fP\&. " .ti -1c .RI "\fBvalarray\fP (const \fBmask_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIma\fP\&. " .ti -1c .RI "\fBvalarray\fP (const \fBindirect_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIia\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBinitializer_list\fP< _Tp >)" .br .RI "Construct an array with an initializer_list of values\&. " .ti -1c .RI "template \fBvalarray\fP (const _Expr< _Dom, _Tp > &__e)" .br .ti -1c .RI "template \fBvalarray\fP (const _Tp *__restrict__ __p, size_t __n)" .br .ti -1c .RI "_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > \fBapply\fP (_Tp func(_Tp)) const" .br .RI "Apply a function to the array\&. " .ti -1c .RI "_Expr< _RefFunClos< _ValArray, _Tp >, _Tp > \fBapply\fP (_Tp func(const _Tp &)) const" .br .RI "Apply a function to the array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBcshift\fP (int __n) const" .br .RI "Return a rotated array\&. " .ti -1c .RI "_Tp \fBmax\fP () const" .br .RI "Return the maximum element using operator<()\&. " .ti -1c .RI "_Tp \fBmin\fP () const" .br .RI "Return the minimum element using operator<()\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator &=\fP (const _Tp &)" .br .RI "Set each element e of array to e & \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator &=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Logical and corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator &=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "_UnaryOp< __logical_not >::_Rt \fBoperator!\fP () const" .br .RI "Return a new valarray by applying unary ! to each element\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator%=\fP (const _Tp &)" .br .RI "Set each element e of array to e % \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator%=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Modulo elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator%=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator*=\fP (const _Tp &)" .br .RI "Multiply each element of array by \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator*=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Multiply elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator*=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "_UnaryOp< __unary_plus >::_Rt \fBoperator+\fP () const" .br .RI "Return a new valarray by applying unary + to each element\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator+=\fP (const _Tp &)" .br .RI "Add \fIt\fP to each element of array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator+=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Add corresponding elements of \fIv\fP to elements of array\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator+=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "_UnaryOp< __negate >::_Rt \fBoperator\-\fP () const" .br .RI "Return a new valarray by applying unary - to each element\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator\-=\fP (const _Tp &)" .br .RI "Subtract \fIt\fP to each element of array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator\-=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Subtract corresponding elements of \fIv\fP from elements of array\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator\-=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator/=\fP (const _Tp &)" .br .RI "Divide each element of array by \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator/=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Divide elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator/=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator<<=\fP (const _Tp &)" .br .RI "Left shift each element e of array by \fIt\fP bits\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator<<=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Left shift elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator<<=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const \fBvalarray\fP< _Tp > &__v)" .br .RI "Assign elements to an array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBvalarray\fP< _Tp > &&__v) noexcept" .br .RI "Move assign elements to an array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const _Tp &__t)" .br .RI "Assign elements to a value\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const \fBslice_array\fP< _Tp > &__sa)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const \fBgslice_array\fP< _Tp > &__ga)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const \fBmask_array\fP< _Tp > &__ma)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (const \fBindirect_array\fP< _Tp > &__ia)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP & \fBoperator=\fP (\fBinitializer_list\fP< _Tp > __l)" .br .RI "Assign elements to an initializer_list\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator>>=\fP (const _Tp &)" .br .RI "Right shift each element e of array by \fIt\fP bits\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator>>=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Right shift elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator>>=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "_Tp & \fBoperator[]\fP (size_t __i)" .br .ti -1c .RI "const _Tp & \fBoperator[]\fP (size_t) const" .br .ti -1c .RI "_Expr< _SClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (\fBslice\fP __s) const" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBslice_array\fP< _Tp > \fBoperator[]\fP (\fBslice\fP __s)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "_Expr< _GClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (const \fBgslice\fP &__s) const" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBgslice_array\fP< _Tp > \fBoperator[]\fP (const \fBgslice\fP &__s)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBoperator[]\fP (const \fBvalarray\fP< bool > &__m) const" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBmask_array\fP< _Tp > \fBoperator[]\fP (const \fBvalarray\fP< bool > &__m)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "_Expr< _IClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (const \fBvalarray\fP< size_t > &__i) const" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBindirect_array\fP< _Tp > \fBoperator[]\fP (const \fBvalarray\fP< size_t > &__i)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator^=\fP (const _Tp &)" .br .RI "Set each element e of array to e ^ \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator^=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Logical xor corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator^=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator|=\fP (const _Tp &)" .br .RI "Set each element e of array to e | \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator|=\fP (const \fBvalarray\fP< _Tp > &)" .br .RI "Logical or corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "template \fBvalarray\fP< _Tp > & \fBoperator|=\fP (const _Expr< _Dom, _Tp > &)" .br .ti -1c .RI "_UnaryOp< __bitwise_not >::_Rt \fBoperator~\fP () const" .br .RI "Return a new valarray by applying unary ~ to each element\&. " .ti -1c .RI "void \fBresize\fP (size_t __size, _Tp __c=_Tp())" .br .RI "Resize array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBshift\fP (int __n) const" .br .RI "Return a shifted array\&. " .ti -1c .RI "size_t \fBsize\fP () const" .br .RI "Return the number of elements in array\&. " .ti -1c .RI "_Tp \fBsum\fP () const" .br .RI "Return the sum of all elements in the array\&. " .ti -1c .RI "void \fBswap\fP (\fBvalarray\fP< _Tp > &__v) noexcept" .br .RI "Swap\&. " .in -1c .SS "Friends" .in +1c .ti -1c .RI "class \fB_Array< _Tp >\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::valarray< _Tp >" Smart array designed to support numeric processing\&. 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\&. .PP \fBTemplate Parameters:\fP .RS 4 \fI_Tp\fP Type of object in the array\&. .RE .PP .PP Definition at line 78 of file valarray\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::valarray\fP< _Tp >::\fBvalarray\fP (const _Tp * __restrict__, size_t)" .PP Construct an array initialized to the first \fIn\fP elements of \fIt\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.