Zephyr Scientific Library (zscilib)
|
Functions used to compare or verify vectors. More...
Functions | |
bool | zsl_vec_is_equal (struct zsl_vec *v, struct zsl_vec *w, zsl_real_t eps) |
Checks if two vectors are identical in size and content. More... | |
bool | zsl_vec_is_nonneg (struct zsl_vec *v) |
Checks if all elements in vector v are >= zero. More... | |
int | zsl_vec_contains (struct zsl_vec *v, zsl_real_t val, zsl_real_t eps) |
Checks if vector v contains val, returning the number of occurences. More... | |
int | zsl_vec_sort (struct zsl_vec *v, struct zsl_vec *w) |
Sorts the values in vector v from smallest to largest using quicksort, and assigns the sorted output to vector w. More... | |
Functions used to compare or verify vectors.
int zsl_vec_contains | ( | struct zsl_vec * | v, |
zsl_real_t | val, | ||
zsl_real_t | eps | ||
) |
Checks if vector v contains val, returning the number of occurences.
v | The vector to check. |
val | The value to check all coefficients for. |
eps | The margin for floating-point equality (ex. '1E-5'). |
Definition at line 416 of file vectors.c.
Referenced by zsl_mtx_eigenvectors(), zsl_sta_mode(), zsl_sta_time_weighted_mean(), and zsl_vec_sort().
bool zsl_vec_is_equal | ( | struct zsl_vec * | v, |
struct zsl_vec * | w, | ||
zsl_real_t | eps | ||
) |
bool zsl_vec_is_nonneg | ( | struct zsl_vec * | v | ) |
Sorts the values in vector v from smallest to largest using quicksort, and assigns the sorted output to vector w.
v | The unsorted, input vector. |
w | The sorted, output vector. |
Definition at line 475 of file vectors.c.
Referenced by zsl_sta_data_range(), zsl_sta_percentile(), zsl_sta_time_weighted_mean(), zsl_sta_trim_mean(), and zsl_sta_weighted_median().