Zephyr Scientific Library (zscilib)
|
Functions used to access or modify matrix rows, columns or coefficients. More...
Functions | |
int | zsl_mtx_get (struct zsl_mtx *m, size_t i, size_t j, zsl_real_t *x) |
Gets a single value from the specified row (i) and column (j). More... | |
int | zsl_mtx_set (struct zsl_mtx *m, size_t i, size_t j, zsl_real_t x) |
Sets a single value at the specified row (i) and column (j). More... | |
int | zsl_mtx_get_row (struct zsl_mtx *m, size_t i, zsl_real_t *v) |
Gets the contents of row 'i' from matrix 'm', assigning the array of data to 'v'. More... | |
int | zsl_mtx_set_row (struct zsl_mtx *m, size_t i, zsl_real_t *v) |
Sets the contents of row 'i' in matrix 'm', assigning the values found in array 'v'. More... | |
int | zsl_mtx_get_col (struct zsl_mtx *m, size_t j, zsl_real_t *v) |
Gets the contents of column 'j' from matrix 'm', assigning the array of data to 'v'. More... | |
int | zsl_mtx_set_col (struct zsl_mtx *m, size_t j, zsl_real_t *v) |
Sets the contents of column 'j' in matrix 'm', assigning the values found in array 'v'. More... | |
Functions used to access or modify matrix rows, columns or coefficients.
int zsl_mtx_get | ( | struct zsl_mtx * | m, |
size_t | i, | ||
size_t | j, | ||
zsl_real_t * | x | ||
) |
Gets a single value from the specified row (i) and column (j).
m | Pointer to the zsl_mtx to use. |
i | The row number to read (0-based). |
j | The column number to read (0-based). |
x | Pointer to where the value should be stored. |
Definition at line 99 of file matrices.c.
Referenced by zsl_mtx_augm_diag(), zsl_mtx_cholesky(), zsl_mtx_deter(), zsl_mtx_eigenvalues(), zsl_mtx_eigenvectors(), zsl_mtx_gauss_elim(), zsl_mtx_gauss_reduc(), zsl_mtx_get_col(), zsl_mtx_get_row(), zsl_mtx_is_sym(), zsl_mtx_norm_elem(), zsl_mtx_pinv(), zsl_mtx_print(), zsl_mtx_reduce(), and zsl_mtx_svd().
int zsl_mtx_get_col | ( | struct zsl_mtx * | m, |
size_t | j, | ||
zsl_real_t * | v | ||
) |
Gets the contents of column 'j' from matrix 'm', assigning the array of data to 'v'.
m | Pointer to the zsl_mtx to use. |
j | The column number to read (0-based). |
v | Pointer to the array where the column vector should be written. Must be at least m->sz_rows elements long! |
Definition at line 159 of file matrices.c.
Referenced by zsl_mtx_cols_norm(), zsl_mtx_eigenvectors(), zsl_mtx_gauss_reduc(), zsl_mtx_gram_schmidt(), zsl_mtx_householder(), zsl_mtx_svd(), zsl_sta_covar_mtx(), zsl_sta_mult_linear_reg(), and zsl_sta_weighted_mult_linear_reg().
int zsl_mtx_get_row | ( | struct zsl_mtx * | m, |
size_t | i, | ||
zsl_real_t * | v | ||
) |
Gets the contents of row 'i' from matrix 'm', assigning the array of data to 'v'.
m | Pointer to the zsl_mtx to use. |
i | The row number to read (0-based). |
v | Pointer to the array where the row vector should be written. Must be at least m->sz_cols elements long! |
Definition at line 127 of file matrices.c.
Referenced by zsl_mtx_trans(), zsl_mtx_vec_wedge(), and zsl_sta_quad_fit().
int zsl_mtx_set | ( | struct zsl_mtx * | m, |
size_t | i, | ||
size_t | j, | ||
zsl_real_t | x | ||
) |
Sets a single value at the specified row (i) and column (j).
m | Pointer to the zsl_mtx to use. |
i | The row number to update (0-based). |
j | The column number to update (0-based). |
x | The value to assign. |
Definition at line 113 of file matrices.c.
Referenced by zsl_mtx_adjoint(), zsl_mtx_augm_diag(), zsl_mtx_cholesky(), zsl_mtx_eigenvectors(), zsl_mtx_entry_fn_empty(), zsl_mtx_entry_fn_identity(), zsl_mtx_entry_fn_random(), zsl_mtx_pinv(), zsl_mtx_set_col(), zsl_mtx_set_row(), and zsl_mtx_svd().
int zsl_mtx_set_col | ( | struct zsl_mtx * | m, |
size_t | j, | ||
zsl_real_t * | v | ||
) |
Sets the contents of column 'j' in matrix 'm', assigning the values found in array 'v'.
m | Pointer to the zsl_mtx to use. |
j | The column number to write to (0-based). |
v | Pointer to the array where the column vector data is stored. Must be at least m->sz_rows elements long! |
Definition at line 176 of file matrices.c.
Referenced by zsl_mtx_cols_norm(), zsl_mtx_eigenvectors(), zsl_mtx_gram_schmidt(), zsl_mtx_svd(), zsl_mtx_trans(), zsl_sta_mult_linear_reg(), and zsl_sta_weighted_mult_linear_reg().
int zsl_mtx_set_row | ( | struct zsl_mtx * | m, |
size_t | i, | ||
zsl_real_t * | v | ||
) |
Sets the contents of row 'i' in matrix 'm', assigning the values found in array 'v'.
m | Pointer to the zsl_mtx to use. |
i | The row number to write to (0-based). |
v | Pointer to the array where the row vector data is stored. Must be at least m->sz_cols elements long! |
Definition at line 144 of file matrices.c.
Referenced by zsl_mtx_vec_wedge(), and zsl_sta_quad_fit().