|
valarray::operator=public member function
valarray<T>& operator=(const valarray<T>& x); valarray<T>& operator=(const T& val); valarray<T>& operator=(const slice_array<T>& sub); valarray<T>& operator=(const gslice_array<T>& sub); valarray<T>& operator=(const mask_array<T>& sub); valarray<T>& operator=(const indirect_array<T>& sub); Assign content Assigns content to valarray object.The first constructor (copy constructor), assigns to each element the value of its corresponding element in x - the behavior is unspecified if sizes do not match. The second constructor assigns to all the elements in the array the value val. The remaining constructors assign the result of the subscriptiong operation sub to the valarray object. Parameters
Return value*thisExample
Output:
See also
|