AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ copyin()

template<class T>
template<class C >
Array& aff::Array< T >::copyin ( const C &  a)
inline

copy values (deep copy) from other array of convertible type

This member function reads the element values of another array of same shape and applies them to this array. In fact the shape needs not be the same. The copy is done through sequential access and as most number as possible will be copied in increasing memory address order.

Example:

A=15.
aff::Array<double> B(3,8);
B.copyin(A);

B will preserve its shape but is filled with the contents of A (which are not where interesting in this example). Changes applied to the contents of B will not affect the contents of A.

Parameters
aother container with element type convertible to element type of this array and appropriate stepper class
Returns
itself

Definition at line 487 of file array.h.

References aff::deepcopy().

Referenced by aff::ConstArray< T >::copyout().

488  {
489  aff::deepcopy(a, *this);
490  return(*this);
491  }
void deepcopy(const S &source, T &target)
deep copy
Definition: deepcopy.h:65
Here is the call graph for this function:
Here is the caller graph for this function: