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

◆ copyout()

template<class T >
ConstSeries< T > aff::ConstSeries< T >::copyout ( ) const

create an identical copy (deep copy) of this array

create a copy of this array

This is mainly used to create a copy of a truely identical array (i.e. array with same element type or at least const version of same element type). Use this function in conjunction with the assignment operator. E.g.:

A=5.;
B=A.copyout();
C=A;

Here arrays A and B have exactly the same contents but use different memory. While changes to elements of C will also affect elements of A, this not the case for changes applied to B.

Definition at line 437 of file series.h.

References aff::Series< T >::copyin().

438  {
439  // must use a writeable container as intermediate object
440  Series<T> copy(this->first(),this->last());
441  copy.copyin(*this);
442  return(copy);
443  }
const Tsubscript & first() const
return first legal index
Definition: linearshape.h:105
const Tsubscript & last() const
return last legal index
Definition: linearshape.h:107
Here is the call graph for this function: