Assignment operator. More...

template<typename ty >
array & operator= (const ty value)
 Scalar assignment. More...
 
array & operator= (const array &a)
 Array assignment. More...
 

Detailed Description

Assignment operator.

The assignment operator is used to assign values to an array.

Function Documentation

array& operator= ( const ty  value)

Scalar assignment.

The scalar assignment operator assigns the value on the right hand side to all locations in the array on the left hand side.

Parameters
valuescalar value
Returns
The array being assigned with the new values
array& operator= ( const array a)

Array assignment.

The array assignment operator assigns the values in the array on the right hand side to the array on the left hand side.

Parameters
asource array
Returns
The array being assigned with the new values
Note
The array operator may not do a deep copy. A deep copy happens only if a subscript indexing is used. For a copy between 2 arrays without any subscript indexing, a deep copy does not happen. If you wish to deep copy, use the copy function.
Both arrays must be of the same dimensions.array assignment