Next: , Previous: Finding maximum and minimum elements of vectors, Up: Vectors


8.3.10 Vector properties

— Function: int gsl_vector_isnull (const gsl_vector * v)
— Function: int gsl_vector_ispos (const gsl_vector * v)
— Function: int gsl_vector_isneg (const gsl_vector * v)

These functions return 1 if all the elements of the vector v are zero, strictly positive, or strictly negative respectively, and 0 otherwise. To test for a non-negative vector, use the expression !gsl_vector_isneg(v).


Back to the GNU Scientific Library Homepage