Functions vector_copy¶
-
template<class
vec_t
, classvec2_t
>
voido2scl
::
vector_copy
(const vec_t &src, vec2_t &dest)¶ Simple vector copy.
Copy
src
todest
, resizingdest
if it is too small to holdsrc.size()
elements.This function will work for any classes
vec_t
andvec2_t
which have suitably definedoperator[]
,size()
, andresize()
methods.
-
template<class
vec_t
, classvec2_t
>
voido2scl
::
vector_copy
(size_t N, const vec_t &src, vec2_t &dest)¶ Simple vector copy of the first N elements.
Copy the first
N
elements ofsrc
todest
. It is assumed that the memory allocation fordest
has already been performed.This function will work for any class
vec2_t
which has an operator[] which returns a reference to the corresponding element and classvec_t
with an operator[] which returns either a reference or the value of the corresponding element.