.TH "std::valarray< _Tp >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::valarray< _Tp > \- Smart array designed to support numeric processing\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP _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 "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &__e)" .br .ti -1c .RI "\fBvalarray\fP (\fBconst\fP _Tp &, size_t)" .br .RI "Construct an array with \fIn\fP elements initialized to \fIt\fP\&. " .ti -1c .RI "template<\fBtypename\fP _Tp > \fBvalarray\fP (\fBconst\fP _Tp *\fB__restrict__\fP __p, size_t __n)" .br .ti -1c .RI "\fBvalarray\fP (\fBconst\fP _Tp *\fB__restrict__\fP, size_t)" .br .RI "Construct an array initialized to the first \fIn\fP elements of \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBconst\fP \fBgslice_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIga\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBconst\fP \fBindirect_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIia\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBconst\fP \fBmask_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIma\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBconst\fP \fBslice_array\fP< _Tp > &)" .br .RI "Construct an array with the same size and values in \fIsa\fP\&. " .ti -1c .RI "\fBvalarray\fP (\fBconst\fP \fBvalarray\fP &)" .br .RI "Copy constructor\&. " .ti -1c .RI "\fBvalarray\fP (\fBinitializer_list\fP< _Tp >)" .br .RI "Construct an array with an initializer_list of values\&. " .ti -1c .RI "\fBvalarray\fP (size_t)" .br .RI "Construct an array with \fIn\fP elements\&. " .ti -1c .RI "\fBvalarray\fP (\fBvalarray\fP &&) \fBnoexcept\fP" .br .RI "Move constructor\&. " .ti -1c .RI "_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > \fBapply\fP (_Tp \fBfunc\fP(_Tp)) \fBconst\fP" .br .RI "Apply a function to the array\&. " .ti -1c .RI "_Expr< _RefFunClos< _ValArray, _Tp >, _Tp > \fBapply\fP (_Tp \fBfunc\fP(\fBconst\fP _Tp &)) \fBconst\fP" .br .RI "Apply a function to the array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBcshift\fP (int __n) \fBconst\fP" .br .RI "Return a rotated array\&. " .ti -1c .RI "_Tp \fBmax\fP () \fBconst\fP" .br .RI "Return the maximum element using operator<()\&. " .ti -1c .RI "_Tp \fBmin\fP () \fBconst\fP" .br .RI "Return the minimum element using operator<()\&. " .ti -1c .RI "_UnaryOp< __logical_not >::_Rt \fBoperator!\fP () \fBconst\fP" .br .RI "Return a new valarray by applying unary ! to each element\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator%=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator%=\fP (\fBconst\fP _Tp &)" .br .RI "Set each element e of array to e % \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator%=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Modulo elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator&=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator&=\fP (\fBconst\fP _Tp &)" .br .RI "Set each element e of array to e & \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator&=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Logical and corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator*=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator*=\fP (\fBconst\fP _Tp &)" .br .RI "Multiply each element of array by \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator*=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Multiply elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "_UnaryOp< __unary_plus >::_Rt \fBoperator+\fP () \fBconst\fP" .br .RI "Return a new valarray by applying unary + to each element\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator+=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator+=\fP (\fBconst\fP _Tp &)" .br .RI "Add \fIt\fP to each element of array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator+=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Add corresponding elements of \fIv\fP to elements of array\&. " .ti -1c .RI "_UnaryOp< __negate >::_Rt \fBoperator\-\fP () \fBconst\fP" .br .RI "Return a new valarray by applying unary - to each element\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator\-=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator\-=\fP (\fBconst\fP _Tp &)" .br .RI "Subtract \fIt\fP to each element of array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator\-=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Subtract corresponding elements of \fIv\fP from elements of array\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator/=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator/=\fP (\fBconst\fP _Tp &)" .br .RI "Divide each element of array by \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator/=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Divide elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator<<=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator<<=\fP (\fBconst\fP _Tp &)" .br .RI "Left shift each element e of array by \fIt\fP bits\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator<<=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Left shift elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP _Tp &__t)" .br .RI "Assign elements to a value\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP \fBgslice_array\fP< _Tp > &\fB__ga\fP)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP \fBindirect_array\fP< _Tp > &\fB__ia\fP)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP \fBmask_array\fP< _Tp > &\fB__ma\fP)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP \fBslice_array\fP< _Tp > &\fB__sa\fP)" .br .RI "Assign elements to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &\fB__v\fP)" .br .RI "Assign elements to an array\&. " .ti -1c .RI "\fBvalarray\fP & \fBoperator=\fP (\fBinitializer_list\fP< _Tp > \fB__l\fP)" .br .RI "Assign elements to an initializer_list\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator=\fP (\fBvalarray\fP< _Tp > &&\fB__v\fP) \fBnoexcept\fP" .br .RI "Move assign elements to an array\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator>>=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator>>=\fP (\fBconst\fP _Tp &)" .br .RI "Right shift each element e of array by \fIt\fP bits\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator>>=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Right shift elements of array by corresponding elements of \fIv\fP\&. " .ti -1c .RI "\fBgslice_array\fP< _Tp > \fBoperator[]\fP (\fBconst\fP \fBgslice\fP &\fB__s\fP)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "_Expr< _GClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (\fBconst\fP \fBgslice\fP &\fB__s\fP) \fBconst\fP" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBmask_array\fP< _Tp > \fBoperator[]\fP (\fBconst\fP \fBvalarray\fP< bool > &\fB__m\fP)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBoperator[]\fP (\fBconst\fP \fBvalarray\fP< bool > &\fB__m\fP) \fBconst\fP" .br .RI "Return an array subset\&. " .ti -1c .RI "\fBindirect_array\fP< _Tp > \fBoperator[]\fP (\fBconst\fP \fBvalarray\fP< size_t > &__i)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "_Expr< _IClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (\fBconst\fP \fBvalarray\fP< size_t > &__i) \fBconst\fP" .br .RI "Return an array subset\&. " .ti -1c .RI "_Tp & \fBoperator[]\fP (size_t __i)" .br .ti -1c .RI "\fBconst\fP _Tp & \fBoperator[]\fP (size_t) \fBconst\fP" .br .ti -1c .RI "\fBslice_array\fP< _Tp > \fBoperator[]\fP (\fBslice\fP \fB__s\fP)" .br .RI "Return a reference to an array subset\&. " .ti -1c .RI "_Expr< _SClos< _ValArray, _Tp >, _Tp > \fBoperator[]\fP (\fBslice\fP \fB__s\fP) \fBconst\fP" .br .RI "Return an array subset\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator^=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator^=\fP (\fBconst\fP _Tp &)" .br .RI "Set each element e of array to e ^ \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator^=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Logical xor corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "template<\fBclass\fP \fB_Dom\fP > \fBvalarray\fP< _Tp > & \fBoperator|=\fP (\fBconst\fP _Expr< \fB_Dom\fP, _Tp > &)" .br .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator|=\fP (\fBconst\fP _Tp &)" .br .RI "Set each element e of array to e | \fIt\fP\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > & \fBoperator|=\fP (\fBconst\fP \fBvalarray\fP< _Tp > &)" .br .RI "Logical or corresponding elements of \fIv\fP with elements of array\&. " .ti -1c .RI "_UnaryOp< __bitwise_not >::_Rt \fBoperator~\fP () \fBconst\fP" .br .RI "Return a new valarray by applying unary ~ to each element\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_t \fB__size\fP, _Tp __c=_Tp())" .br .RI "Resize array\&. " .ti -1c .RI "\fBvalarray\fP< _Tp > \fBshift\fP (int __n) \fBconst\fP" .br .RI "Return a shifted array\&. " .ti -1c .RI "size_t \fBsize\fP () \fBconst\fP" .br .RI "Return the number of elements in array\&. " .ti -1c .RI "_Tp \fBsum\fP () \fBconst\fP" .br .RI "Return the sum of all elements in the array\&. " .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBvalarray\fP< _Tp > &\fB__v\fP) \fBnoexcept\fP" .br .RI "Swap\&. " .in -1c .SS "Friends" .in +1c .ti -1c .RI "\fBstruct\fP \fB_Array< _Tp >\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBclass\fP _Tp> .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 .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBclass\fP _Tp > \fBstd::valarray\fP< _Tp >::valarray (\fBconst\fP _Tp * __restrict__, size_t)" .PP Construct an array initialized to the first \fIn\fP elements of \fIt\fP\&. .SH "Member Function Documentation" .PP .SS "template<\fBclass\fP _Tp > _UnaryOp< __logical_not >::_Rt \fBstd::valarray\fP< _Tp >::operator! () const" .PP Return a new valarray by applying unary ! to each element\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator%= (\fBconst\fP _Tp &)" .PP Set each element e of array to e % \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator%= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Modulo elements of array by corresponding elements of \fIv\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator&= (\fBconst\fP _Tp &)" .PP Set each element e of array to e & \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator&= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Logical and corresponding elements of \fIv\fP with elements of array\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator*= (\fBconst\fP _Tp &)" .PP Multiply each element of array by \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator*= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Multiply elements of array by corresponding elements of \fIv\fP\&. .SS "template<\fBclass\fP _Tp > _UnaryOp< __unary_plus >::_Rt \fBstd::valarray\fP< _Tp >::operator+ () const" .PP Return a new valarray by applying unary + to each element\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator+= (\fBconst\fP _Tp &)" .PP Add \fIt\fP to each element of array\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator+= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Add corresponding elements of \fIv\fP to elements of array\&. .SS "template<\fBclass\fP _Tp > _UnaryOp< __negate >::_Rt \fBstd::valarray\fP< _Tp >::operator\- () const" .PP Return a new valarray by applying unary - to each element\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator\-= (\fBconst\fP _Tp &)" .PP Subtract \fIt\fP to each element of array\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator\-= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Subtract corresponding elements of \fIv\fP from elements of array\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator/= (\fBconst\fP _Tp &)" .PP Divide each element of array by \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator/= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Divide elements of array by corresponding elements of \fIv\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator<<= (\fBconst\fP _Tp &)" .PP Left shift each element e of array by \fIt\fP bits\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator<<= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Left shift elements of array by corresponding elements of \fIv\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator>>= (\fBconst\fP _Tp &)" .PP Right shift each element e of array by \fIt\fP bits\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator>>= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Right shift elements of array by corresponding elements of \fIv\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator^= (\fBconst\fP _Tp &)" .PP Set each element e of array to e ^ \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator^= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Logical xor corresponding elements of \fIv\fP with elements of array\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator|= (\fBconst\fP _Tp &)" .PP Set each element e of array to e | \fIt\fP\&. .SS "template<\fBclass\fP _Tp > \fBvalarray\fP< _Tp > & \fBstd::valarray\fP< _Tp >::operator|= (\fBconst\fP \fBvalarray\fP< _Tp > &)" .PP Logical or corresponding elements of \fIv\fP with elements of array\&. .SS "template<\fBclass\fP _Tp > _UnaryOp< __bitwise_not >::_Rt \fBstd::valarray\fP< _Tp >::operator~ () const" .PP Return a new valarray by applying unary ~ to each element\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.