Zephyr Scientific Library (zscilib)
|
Vector initisialisation. More...
Functions | |
int | zsl_vec_init (struct zsl_vec *v) |
int | zsl_vec_from_arr (struct zsl_vec *v, zsl_real_t *a) |
Converts an array of values into a vector. The number of elements in array 'a' must match the number of elements in vector 'v'. As such, 'v' should be previously initialised with an appropriate value assigned to v.sz. More... | |
int | zsl_vec_copy (struct zsl_vec *vdest, struct zsl_vec *vsrc) |
Copies the contents of vector 'vsrc' into vector 'vdest'. More... | |
Vector initisialisation.
Copies the contents of vector 'vsrc' into vector 'vdest'.
vdest | Pointer to the destination vector data will be copied to. |
vsrc | Pointer to the source vector data will be copied from. |
Definition at line 33 of file vectors.c.
Referenced by zsl_mtx_householder(), zsl_sta_demean(), and zsl_vec_project().
int zsl_vec_from_arr | ( | struct zsl_vec * | v, |
zsl_real_t * | a | ||
) |
Converts an array of values into a vector. The number of elements in array 'a' must match the number of elements in vector 'v'. As such, 'v' should be previously initialised with an appropriate value assigned to v.sz.
v | The vector that the contents of array 'a' should be assigned to. The v.sz value must match the number of elements in 'a', meaning that the vector should be initialised before being passed in to this function. |
a | Pointer to the array containing the values to assign to 'v'. The array will be read v.sz elements deep. |
Definition at line 26 of file vectors.c.
Referenced by zsl_mtx_svd(), zsl_mtx_vec_wedge(), zsl_sta_mult_linear_reg(), zsl_sta_quad_fit(), and zsl_sta_weighted_mult_linear_reg().
int zsl_vec_init | ( | struct zsl_vec * | v | ) |
Initialises vector 'v' with 0.0 values.
v | Pointer to the zsl_vec to initialise/clear. |
Definition at line 19 of file vectors.c.
Referenced by zsl_mtx_eigenvalues(), zsl_mtx_eigenvectors(), zsl_mtx_gram_schmidt(), zsl_mtx_householder(), zsl_sta_mode(), zsl_sta_percentile(), zsl_sta_trim_mean(), zsl_sta_weighted_median(), zsl_vec_sort(), and zsl_vec_to_unit().