Next: , Previous: , Up: Vectors   [Index]


8.3.6 Copying vectors

Common operations on vectors such as addition and multiplication are available in the BLAS part of the library (see BLAS Support). However, it is useful to have a small number of utility functions which do not require the full BLAS code. The following functions fall into this category.

Function: int gsl_vector_memcpy (gsl_vector * dest, const gsl_vector * src)

This function copies the elements of the vector src into the vector dest. The two vectors must have the same length.

Function: int gsl_vector_swap (gsl_vector * v, gsl_vector * w)

This function exchanges the elements of the vectors v and w by copying. The two vectors must have the same length.