- 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. RossiPaperback (6"x9"), 592 pages, 60 figuresISBN 0954612078RRP £24.95 (\$39.95)

### 8.3.9 Finding maximum and minimum elements of vectors

The following operations are only defined for real vectors.

Function: double gsl_vector_max (const gsl_vector * v)
This function returns the maximum value in the vector v.
Function: double gsl_vector_min (const gsl_vector * v)
This function returns the minimum value in the vector v.
Function: void gsl_vector_minmax (const gsl_vector * v, double * min_out, double * max_out)
This function returns the minimum and maximum values in the vector v, storing them in min_out and max_out.
Function: size_t gsl_vector_max_index (const gsl_vector * v)
This function returns the index of the maximum value in the vector v. When there are several equal maximum elements then the lowest index is returned.
Function: size_t gsl_vector_min_index (const gsl_vector * v)
This function returns the index of the minimum value in the vector v. When there are several equal minimum elements then the lowest index is returned.
Function: void gsl_vector_minmax_index (const gsl_vector * v, size_t * imin, size_t * imax)
This function returns the indices of the minimum and maximum values in the vector v, storing them in imin and imax. When there are several equal minimum or maximum elements then the lowest indices are returned.
 ISBN 0954612078 GNU Scientific Library Reference Manual - Third Edition (v1.12) See the print edition