Exchanging elements - GNU Scientific Library -- Reference Manual
Description: GNU Scientific Library -- Reference Manual

Next: Vector operations, Previous: Copying vectors, Up: Vectors

#### 8.3.7 Exchanging elements

The following function can be used to exchange, or permute, the elements of a vector.

— Function: int gsl_vector_swap_elements (gsl_vector * v, size_t i, size_t j)

> This function exchanges the i-th and j-th elements of the vector v in-place.

— Function: int gsl_vector_reverse (gsl_vector * v)

> This function reverses the order of the elements of the vector v.

The GNU Scientific Library - a free numerical library licensed under the GNU GPL
Back to the GNU Scientific Library Homepage