Functions matrix_copy¶
-
template<class
mat_t
, classmat2_t
>
voido2scl
::
matrix_copy
(mat_t &src, mat2_t &dest)¶ Simple matrix copy.
Copy
src
todest
, resizingdest
if it is too small.This function will work for any classes
mat_t
andmat2_t
which have suitably definedoperator()
,size()
, andresize()
methods.
-
template<class
mat_t
, classmat2_t
>
voido2scl
::
matrix_copy
(size_t M, size_t N, mat_t &src, mat2_t &dest)¶ Simple matrix copy of the first \( (M,N) \) matrix elements.
Copy the first
(M,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.