- publishing free software manuals
GNU Scientific Library Reference Manual - Third Edition (v1.12)
by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi
Paperback (6"x9"), 592 pages, 60 figures
ISBN 0954612078
RRP £24.95 ($39.95)

Get a printed copy>>>

8.3.8 Vector operations

Function: int gsl_vector_add (gsl_vector * a, const gsl_vector * b)
This function adds the elements of vector b to the elements of vector a, a'_i = a_i + b_i. The two vectors must have the same length.
Function: int gsl_vector_sub (gsl_vector * a, const gsl_vector * b)
This function subtracts the elements of vector b from the elements of vector a, a'_i = a_i - b_i. The two vectors must have the same length.
Function: int gsl_vector_mul (gsl_vector * a, const gsl_vector * b)
This function multiplies the elements of vector a by the elements of vector b, a'_i = a_i * b_i. The two vectors must have the same length.
Function: int gsl_vector_div (gsl_vector * a, const gsl_vector * b)
This function divides the elements of vector a by the elements of vector b, a'_i = a_i / b_i. The two vectors must have the same length.
Function: int gsl_vector_scale (gsl_vector * a, const double x)
This function multiplies the elements of vector a by the constant factor x, a'_i = x a_i.
Function: int gsl_vector_add_constant (gsl_vector * a, const double x)
This function adds the constant value x to the elements of the vector a, a'_i = a_i + x.
ISBN 0954612078GNU Scientific Library Reference Manual - Third Edition (v1.12)See the print edition