Modules | |
Set Attributes of a General Size Matrix | |
Fill a General Size Matrix with Values | |
Read Elements of a General Size Matrix | |
Threshold Elements of a General Size Matrix | |
Invert a General Size Matrix | |
General Size Matrix/Matrix Product | |
Allocate/Free a General Size Matrix | |
Norms of a General Size Matrix | |
Copy a General Size Matrix | |
Multiply/Divide a General Size Matrix by a Scalar | |
Transpose a General Size Matrix | |
Add General Size Matrices | |
Subtract General Size Matrices | |
General Size Matrix/Vector Product | |
Insert Part of a General Size Matrix in Another | |
Extract Part of a General Size Matrix | |
General Size Matrix I/O | |
Access an Element of a General Size Matrix | |
Test a General Size Matrix | |
Get Dimensions of General Size Matrix | |
Eigendecomposition of a General Size Matrix | |
LQ Decomposition of a General Size Matrix | |
QR Decomposition of a General Size Matrix | |
General Size Matrix Triple Product | |
Cholesky Factorisation of a General Size Matrix | |
Convert a General Size Matrix | |
Singular Value Decomposition of a General Size Matrix | |
Pseudo-Inverse of a General Size Matrix | |
Compounds | |
struct | Gan_Matrix |
Structure definition for double precision general size matrix. More... | |
struct | Gan_Matrix_f |
Structure definition for single precision general size matrix. More... | |
struct | Gan_SquMatrix |
Structure definition for double precision general size square matrix. More... | |
struct | Gan_SquMatrix_f |
Structure definition for single precision general size square matrix. More... | |
struct | Gan_SquMatrixFFuncs |
Structure containing type-specific functions. More... | |
struct | Gan_SquMatrixFuncs |
Structure containing type-specific functions. More... | |
Defines | |
#define | GAN_MATRIX_STRUCT_DEFINED |
#define | gan_mat_realloc(A, rows, cols) gan_mat_realloc_gen(A,rows,cols) |
#define | GAN_SQUMATRIX_STRUCT_DEFINED |
#define | GAN_MATRIXF_STRUCT_DEFINED |
#define | gan_matf_realloc(A, rows, cols) gan_matf_realloc_gen(A,rows,cols) |
#define | GAN_SQUMATRIXF_STRUCT_DEFINED |
Typedefs | |
typedef Gan_Matrix | Gan_Matrix |
Structure definition for double precision general size matrix. | |
typedef Gan_SquMatrixFuncs | Gan_SquMatrixFuncs |
Structure containing type-specific functions. | |
typedef Gan_SquMatrix | Gan_SquMatrix |
Structure definition for double precision general size square matrix. | |
typedef Gan_Matrix_f | Gan_Matrix_f |
Structure definition for single precision general size matrix. | |
typedef Gan_SquMatrixFFuncs | Gan_SquMatrixFFuncs |
Structure containing type-specific functions. | |
typedef Gan_SquMatrix_f | Gan_SquMatrix_f |
Structure definition for single precision general size square matrix. | |
Enumerations | |
enum | Gan_TposeFlag { GAN_NOTRANSPOSE = 0, GAN_TRANSPOSE = 1 } |
Whether or not matrix is (to be) transposed. More... | |
enum | Gan_InvertFlag { GAN_NOINVERT = 0, GAN_INVERT = 1 } |
Whether or not matrix is (to be) inverted. More... | |
enum | Gan_UpLoFlag { GAN_LOWER, GAN_UPPER } |
Whether matrix is upper or lower triangular. More... | |
enum | Gan_UnitFlag { GAN_NOUNIT = 0, GAN_UNIT = 1 } |
Whether triangular matrix is unit along the diagonal. More... | |
enum | Gan_SideFlag { GAN_LEFTMULT = 0, GAN_RIGHTMULT = 1 } |
Whether product is on left or right side. More... | |
enum | Gan_SquMatrixType { GAN_SYMMETRIC_MATRIX, GAN_DIAGONAL_MATRIX, GAN_SCALED_IDENT_MATRIX, GAN_LOWER_TRI_MATRIX, GAN_UPPER_TRI_MATRIX, GAN_ZERO_SQUARE_MATRIX } |
Types of square matrix. More... | |
Functions | |
Gan_SquMatrix * | gan_diagmat_set_size (Gan_SquMatrix *A, unsigned long size) |
Set square matrix to be diagonal with given size. | |
Gan_SquMatrix * | gan_diagmat_fill_va (Gan_SquMatrix *A, unsigned long size,...) |
Fill diagonal matrix from variable argument list. | |
Gan_SquMatrix * | gan_diagmat_fill_const_q (Gan_SquMatrix *A, unsigned long size, double value) |
Fill a diagonal matrix with constant value. | |
Gan_Bool | gan_diagmat_read_va (Gan_SquMatrix *A, unsigned long size,...) |
Read the elements of a diagonal matrix into pointers. | |
Gan_SquMatrix * | gan_diagmat_diag_thres (Gan_SquMatrix *A, unsigned null_space, double thres, int *indexptr, double **elptr) |
Threshold small diagonal elements of a diagonal matrix. | |
Gan_SquMatrix * | gan_diagmat_inv_diag_thres (Gan_SquMatrix *A, unsigned null_space, double thres) |
Invert the elements of diagonal matrix. | |
Gan_Matrix * | gan_diagmatI_lmult_inf_q (Gan_SquMatrix *A, struct Gan_Matrix *B, struct Gan_Matrix *C) |
Gan_SquMatrix * | gan_diagmat_form_gen (Gan_SquMatrix *A, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_diagmat_fill_vap (Gan_SquMatrix *A, unsigned long size, va_list *aptr) |
Fill diagonal matrix with values from variable argument list. | |
void | gan_mat_db (Gan_Matrix *A) |
void | gan_mat_free (Gan_Matrix *A) |
Free a matrix. | |
Gan_Matrix * | gan_mat_set_dims (Gan_Matrix *A, unsigned long rows, unsigned long cols) |
Set dimensions of generic matrix. | |
Gan_Matrix * | gan_mat_fill_va (Gan_Matrix *A, unsigned long rows, unsigned long cols,...) |
Fill matrix from variable argument list. | |
Gan_Matrix * | gan_mat_fill_vap (Gan_Matrix *A, unsigned long rows, unsigned long cols, va_list *aptr) |
Fill matrix from variable argument list. | |
Gan_Matrix * | gan_mat_fill_const_q (Gan_Matrix *A, unsigned long rows, unsigned long cols, double value) |
Fill all elements of a matrix with the same value. | |
Gan_Bool | gan_mat_read_va (Gan_Matrix *A, unsigned long rows, unsigned long cols,...) |
Read elements of matrix from variable argument list. | |
Gan_Matrix * | gan_mat_copy_q (Gan_Matrix *A, Gan_Matrix *B) |
Copy matrix. | |
Gan_Matrix * | gan_mat_scale_q (Gan_Matrix *A, double a, Gan_Matrix *B) |
Multiply matrix by scalar. | |
Gan_Matrix * | gan_mat_divide_q (Gan_Matrix *A, double a, Gan_Matrix *B) |
Divide matrix by scalar. | |
Gan_Matrix * | gan_mat_tpose_q (Gan_Matrix *A, Gan_Matrix *B) |
Transpose matrix. | |
Gan_Matrix * | gan_mat_insertsym (Gan_Matrix *A, unsigned long rA, unsigned long cA, struct Gan_SquMatrix *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
void | gan_mat_free_va (Gan_Matrix *A,...) |
Free a NULL-terminated variable argument list of matrices. | |
Gan_Matrix * | gan_mat_extract_q (Gan_Matrix *A, unsigned long r0, unsigned long c0, unsigned long rows, unsigned long cols, Gan_Matrix *B) |
Extracts rectangular part of matrix. | |
double | gan_mat_sumsqr (Gan_Matrix *A) |
Returns squared Frobenius norm of generic rectangular matrix. | |
double | gan_mat_Fnorm (Gan_Matrix *A) |
Returns Frobenius norm of generic rectangular matrix. | |
Gan_Matrix * | gan_mat_invert_q (Gan_Matrix *A, Gan_Matrix *B) |
Inverts general square matrix. | |
Gan_Bool | gan_mat_fprint (FILE *fp, Gan_Matrix *A, const char *prefix, unsigned indent, const char *fmt) |
Print matrix to file pointer. | |
Gan_Matrix * | gan_mat_fscanf_q (FILE *fp, Gan_Matrix *A, char *prefix, int prefix_len) |
Read matrix from file. | |
Gan_Bool | gan_mat_fwrite (FILE *fp, Gan_Matrix *A, gan_ui32 magic_number) |
Print matrix to binary file pointer. | |
Gan_Matrix * | gan_mat_fread_q (FILE *fp, Gan_Matrix *A, gan_ui32 *magic_number) |
Read matrix from file in binary format. | |
Gan_Matrix * | gan_mat_form_gen (Gan_Matrix *A, unsigned long rows, unsigned long cols, double *data, size_t data_size) |
Gan_Bool | gan_mat_realloc_gen (Gan_Matrix *A, unsigned long rows, unsigned long cols) |
Gan_Matrix * | gan_mat_add_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Matrix *B, Gan_TposeFlag B_tr, Gan_Matrix *C) |
Add general size matrices. | |
Gan_SquMatrix * | gan_mat_add_sym_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Matrix *B, Gan_TposeFlag B_tr, struct Gan_SquMatrix *C) |
Add general size matrices producing a symmetric matrix. | |
Gan_Matrix * | gan_mat_sub_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Matrix *B, Gan_TposeFlag B_tr, Gan_Matrix *C) |
Subtract general size matrices. | |
Gan_Vector * | gan_mat_multv_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Vector *x, Gan_Vector *y) |
Multiply matrix and a vector. | |
Gan_Matrix * | gan_mat_rmult_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Matrix *B, Gan_TposeFlag B_tr, Gan_Matrix *C) |
Gan_SquMatrix * | gan_mat_rmult_sym_gen (Gan_Matrix *A, Gan_TposeFlag A_tr, Gan_Matrix *B, Gan_TposeFlag B_tr, struct Gan_SquMatrix *C) |
Gan_Matrix * | gan_mat_insert_gen (Gan_Matrix *A, unsigned long rA, unsigned long cA, Gan_Matrix *B, Gan_TposeFlag B_tr, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Insert part of generic matrix in another generic matrix. | |
Gan_Matrix * | gan_mat_insertv_gen (Gan_Matrix *A, unsigned long rA, unsigned long cA, struct Gan_Vector *x, Gan_TposeFlag x_tr, unsigned long rx, unsigned long size) |
Gan_SquMatrix * | gan_scalImat_set_size (Gan_SquMatrix *A, unsigned long size) |
Set square matrix to be multiple of identity with given size. | |
Gan_SquMatrix * | gan_scalImat_fill_va (Gan_SquMatrix *A, unsigned long size,...) |
Fill multiple of the identity matrix from variable argument list. | |
Gan_SquMatrix * | gan_scalImat_fill_const_q (Gan_SquMatrix *A, unsigned long size, double value) |
Fill a scaled identity matrix with constant value. | |
Gan_Bool | gan_scalImat_read_va (Gan_SquMatrix *A, unsigned long size,...) |
Read the elements of a scaled identity matrix into pointers. | |
Gan_SquMatrix * | gan_scalImat_form_gen (Gan_SquMatrix *A, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_scalImat_fill_vap (Gan_SquMatrix *A, unsigned long size, va_list *aptr) |
Fill multiple of identity matrix using variable argument list. | |
void | gan_squmat_db (Gan_SquMatrix *A) |
void | gan_squmat_free (Gan_SquMatrix *A) |
Function to free square matrix. | |
void | gan_squmat_free_va (Gan_SquMatrix *A,...) |
Free a NULL-terminated variable argument list of square matrices. | |
Gan_SquMatrix * | gan_squmat_set_type_size (Gan_SquMatrix *A, Gan_SquMatrixType type, unsigned long size) |
Set type and size of square matrix. | |
Gan_SquMatrix * | gan_squmat_fill_vap (Gan_SquMatrix *A, Gan_SquMatrixType type, unsigned long size, va_list *aptr) |
Fill square matrix from variable argument list. | |
Gan_SquMatrix * | gan_squmat_fill_const_q (Gan_SquMatrix *A, Gan_SquMatrixType type, unsigned long size, double value) |
Fill square matrix with constant value. | |
size_t | gan_squmat_data_size (Gan_SquMatrixType type, unsigned long size) |
Returns size of data array needed to create a matrix of given type & size. | |
Gan_SquMatrix * | gan_squmat_fscanf_q (FILE *fp, Gan_SquMatrix *A, char *prefix, int prefix_len) |
Read square matrix from ASCII file. | |
Gan_Bool | gan_squmat_fwrite (FILE *fp, Gan_SquMatrix *A, gan_ui32 magic_number) |
Write square matrix to binary file. | |
Gan_SquMatrix * | gan_squmat_fread_q (FILE *fp, Gan_SquMatrix *A, gan_ui32 *magic_number) |
Read square matrix from binary file. | |
Gan_SquMatrix * | gan_squmat_form_gen (Gan_SquMatrix *A, Gan_SquMatrixType type, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_symmat_set_size (Gan_SquMatrix *A, unsigned long size) |
Set square matrix to be symmetric with given size. | |
Gan_SquMatrix * | gan_symmat_fill_va (Gan_SquMatrix *A, unsigned long size,...) |
Fill symmetric matrix from variable argument list. | |
Gan_SquMatrix * | gan_symmat_fill_const_q (Gan_SquMatrix *A, unsigned long size, double value) |
Fill symmetric matrix with constant value, and set its size. | |
Gan_Bool | gan_symmat_read_va (Gan_SquMatrix *A, unsigned long size,...) |
Read the elements of a symmetric matrix into pointers. | |
Gan_SquMatrix * | gan_symmat_insertsym (Gan_SquMatrix *A, unsigned long rA, Gan_SquMatrix *B, unsigned long rB, unsigned long size) |
Insert diagonal part of symmetric matrix in symmetric matrix. | |
Gan_SquMatrix * | gan_symmat_insertsym_od (Gan_SquMatrix *A, unsigned long rA, unsigned long cA, Gan_SquMatrix *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Insert off-diagonal part of symmetric matrix in symmetric matrix. | |
Gan_Bool | gan_symmat_eigen (Gan_SquMatrix *A, Gan_SquMatrix *W, struct Gan_Matrix *Z, Gan_Bool sort, double *work, unsigned long work_size) |
Gan_SquMatrix * | gan_symmat_form_gen (Gan_SquMatrix *A, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_symmat_fill_vap (Gan_SquMatrix *A, unsigned long size, va_list *aptr) |
Fill symmetric matrix with values from variable argument list. | |
Gan_SquMatrix * | gan_symmat_insert_gen (Gan_SquMatrix *S, unsigned long rS, unsigned long cS, struct Gan_Matrix *B, Gan_TposeFlag B_tr, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Gan_SquMatrix * | gan_symmat_insertv_gen (Gan_SquMatrix *A, unsigned long rA, unsigned long cA, struct Gan_Vector *x, Gan_TposeFlag x_tr, unsigned long rx, unsigned long size) |
Gan_SquMatrix * | gan_ltmat_set_size (Gan_SquMatrix *L, unsigned long size) |
Set square matrix to be lower triangular with given size. | |
Gan_SquMatrix * | gan_utmat_set_size (Gan_SquMatrix *U, unsigned long size) |
Set square matrix to be upper triangular with given size. | |
Gan_SquMatrix * | gan_ltmat_fill_va (Gan_SquMatrix *L, unsigned long size,...) |
Fill a lower triangular matrix with values. | |
Gan_SquMatrix * | gan_utmat_fill_va (Gan_SquMatrix *U, unsigned long size,...) |
Fill an upper triangular matrix with values. | |
Gan_SquMatrix * | gan_ltmat_fill_const_q (Gan_SquMatrix *L, unsigned long size, double value) |
Fill a lower triangular matrix with a constant value. | |
Gan_SquMatrix * | gan_utmat_fill_const_q (Gan_SquMatrix *U, unsigned long size, double value) |
Fill a upper triangular matrix with a constant value. | |
Gan_Bool | gan_ltmat_read_va (Gan_SquMatrix *L, unsigned long size,...) |
Read the elements of a lower triangular matrix into pointers. | |
Gan_Bool | gan_utmat_read_va (Gan_SquMatrix *U, unsigned long size,...) |
Read the elements of an upper triangular matrix into pointers. | |
Gan_SquMatrix * | gan_ltmat_form_gen (Gan_SquMatrix *A, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_utmat_form_gen (Gan_SquMatrix *A, unsigned long size, double *data, size_t data_size) |
Gan_SquMatrix * | gan_ltmat_fill_vap (Gan_SquMatrix *L, unsigned long size, va_list *aptr) |
Fills a lower triangular matrix with values. | |
Gan_SquMatrix * | gan_utmat_fill_vap (Gan_SquMatrix *U, unsigned long size, va_list *aptr) |
Fills an upper triangular matrix with values. | |
Gan_SquMatrix_f * | gan_diagmatf_set_size (Gan_SquMatrix_f *A, unsigned long size) |
Set square matrix to be diagonal with given size. | |
Gan_SquMatrix_f * | gan_diagmatf_fill_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Fill diagonal matrix from variable argument list. | |
Gan_SquMatrix_f * | gan_diagmatf_fill_const_q (Gan_SquMatrix_f *A, unsigned long size, float value) |
Fill a diagonal matrix with constant value. | |
Gan_Bool | gan_diagmatf_read_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Read the elements of a diagonal matrix into pointers. | |
Gan_SquMatrix_f * | gan_diagmatf_diag_thres (Gan_SquMatrix_f *A, unsigned null_space, float thres, int *indexptr, float **elptr) |
Threshold small diagonal elements of a diagonal matrix. | |
Gan_SquMatrix_f * | gan_diagmatf_inv_diag_thres (Gan_SquMatrix_f *A, unsigned null_space, float thres) |
Invert the elements of diagonal matrix. | |
Gan_Matrix_f * | gan_diagmatIf_lmult_inf_q (Gan_SquMatrix_f *A, struct Gan_Matrix_f *B, struct Gan_Matrix_f *C) |
Gan_SquMatrix_f * | gan_diagmatf_form_gen (Gan_SquMatrix_f *A, unsigned long size, float *data, size_t data_size) |
Gan_SquMatrix_f * | gan_diagmatf_fill_vap (Gan_SquMatrix_f *A, unsigned long size, va_list *aptr) |
Fill diagonal matrix with values from variable argument list. | |
void | gan_matf_db (Gan_Matrix_f *A) |
void | gan_matf_free (Gan_Matrix_f *A) |
Free a matrix. | |
Gan_Matrix_f * | gan_matf_set_dims (Gan_Matrix_f *A, unsigned long rows, unsigned long cols) |
Set dimensions of generic matrix. | |
Gan_Matrix_f * | gan_matf_fill_va (Gan_Matrix_f *A, unsigned long rows, unsigned long cols,...) |
Fill matrix from variable argument list. | |
Gan_Matrix_f * | gan_matf_fill_vap (Gan_Matrix_f *A, unsigned long rows, unsigned long cols, va_list *aptr) |
Fill matrix from variable argument list. | |
Gan_Matrix_f * | gan_matf_fill_const_q (Gan_Matrix_f *A, unsigned long rows, unsigned long cols, float value) |
Fill all elements of a matrix with the same value. | |
Gan_Bool | gan_matf_read_va (Gan_Matrix_f *A, unsigned long rows, unsigned long cols,...) |
Read elements of matrix from variable argument list. | |
Gan_Matrix_f * | gan_matf_copy_q (Gan_Matrix_f *A, Gan_Matrix_f *B) |
Copy matrix. | |
Gan_Matrix_f * | gan_matf_scale_q (Gan_Matrix_f *A, float a, Gan_Matrix_f *B) |
Multiply matrix by scalar. | |
Gan_Matrix_f * | gan_matf_divide_q (Gan_Matrix_f *A, float a, Gan_Matrix_f *B) |
Divide matrix by scalar. | |
Gan_Matrix_f * | gan_matf_tpose_q (Gan_Matrix_f *A, Gan_Matrix_f *B) |
Transpose matrix. | |
Gan_Matrix_f * | gan_matf_insertsym (Gan_Matrix_f *A, unsigned long rA, unsigned long cA, struct Gan_SquMatrix_f *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
void | gan_matf_free_va (Gan_Matrix_f *A,...) |
Free a NULL-terminated variable argument list of matrices. | |
Gan_Matrix_f * | gan_matf_extract_q (Gan_Matrix_f *A, unsigned long r0, unsigned long c0, unsigned long rows, unsigned long cols, Gan_Matrix_f *B) |
Extracts rectangular part of matrix. | |
float | gan_matf_sumsqr (Gan_Matrix_f *A) |
Returns squared Frobenius norm of generic rectangular matrix. | |
float | gan_matf_Fnorm (Gan_Matrix_f *A) |
Returns Frobenius norm of generic rectangular matrix. | |
Gan_Matrix_f * | gan_matf_invert_q (Gan_Matrix_f *A, Gan_Matrix_f *B) |
Inverts general square matrix. | |
Gan_Bool | gan_matf_fprint (FILE *fp, Gan_Matrix_f *A, const char *prefix, unsigned indent, const char *fmt) |
Print matrix to file pointer. | |
Gan_Matrix_f * | gan_matf_fscanf_q (FILE *fp, Gan_Matrix_f *A, char *prefix, int prefix_len) |
Read matrix from file. | |
Gan_Bool | gan_matf_fwrite (FILE *fp, Gan_Matrix_f *A, gan_ui32 magic_number) |
Print matrix to binary file pointer. | |
Gan_Matrix_f * | gan_matf_fread_q (FILE *fp, Gan_Matrix_f *A, gan_ui32 *magic_number) |
Read matrix from file in binary format. | |
Gan_Matrix_f * | gan_matf_form_gen (Gan_Matrix_f *A, unsigned long rows, unsigned long cols, float *data, size_t data_size) |
Gan_Bool | gan_matf_realloc_gen (Gan_Matrix_f *A, unsigned long rows, unsigned long cols) |
Gan_Matrix_f * | gan_matf_add_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Matrix_f *B, Gan_TposeFlag B_tr, Gan_Matrix_f *C) |
Add general size matrices. | |
Gan_SquMatrix_f * | gan_matf_add_sym_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Matrix_f *B, Gan_TposeFlag B_tr, struct Gan_SquMatrix_f *C) |
Add general size matrices producing a symmetric matrix. | |
Gan_Matrix_f * | gan_matf_sub_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Matrix_f *B, Gan_TposeFlag B_tr, Gan_Matrix_f *C) |
Subtract general size matrices. | |
Gan_Vector_f * | gan_matf_multv_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Vector_f *x, Gan_Vector_f *y) |
Multiply matrix and a vector. | |
Gan_Matrix_f * | gan_matf_rmult_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Matrix_f *B, Gan_TposeFlag B_tr, Gan_Matrix_f *C) |
Gan_SquMatrix_f * | gan_matf_rmult_sym_gen (Gan_Matrix_f *A, Gan_TposeFlag A_tr, Gan_Matrix_f *B, Gan_TposeFlag B_tr, struct Gan_SquMatrix_f *C) |
Gan_Matrix_f * | gan_matf_insert_gen (Gan_Matrix_f *A, unsigned long rA, unsigned long cA, Gan_Matrix_f *B, Gan_TposeFlag B_tr, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Insert part of generic matrix in another generic matrix. | |
Gan_Matrix_f * | gan_matf_insertv_gen (Gan_Matrix_f *A, unsigned long rA, unsigned long cA, struct Gan_Vector_f *x, Gan_TposeFlag x_tr, unsigned long rx, unsigned long size) |
Gan_SquMatrix_f * | gan_scalImatf_set_size (Gan_SquMatrix_f *A, unsigned long size) |
Set square matrix to be multiple of identity with given size. | |
Gan_SquMatrix_f * | gan_scalImatf_fill_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Fill multiple of the identity matrix from variable argument list. | |
Gan_SquMatrix_f * | gan_scalImatf_fill_const_q (Gan_SquMatrix_f *A, unsigned long size, float value) |
Fill a scaled identity matrix with constant value. | |
Gan_Bool | gan_scalImatf_read_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Read the elements of a scaled identity matrix into pointers. | |
Gan_SquMatrix_f * | gan_scalImatf_form_gen (Gan_SquMatrix_f *A, unsigned long size, float *data, size_t data_size) |
Gan_SquMatrix_f * | gan_scalImatf_fill_vap (Gan_SquMatrix_f *A, unsigned long size, va_list *aptr) |
Fill multiple of identity matrix using variable argument list. | |
void | gan_squmatf_db (Gan_SquMatrix_f *A) |
void | gan_squmatf_free (Gan_SquMatrix_f *A) |
Function to free square matrix. | |
void | gan_squmatf_free_va (Gan_SquMatrix_f *A,...) |
Free a NULL-terminated variable argument list of square matrices. | |
Gan_SquMatrix_f * | gan_squmatf_set_type_size (Gan_SquMatrix_f *A, Gan_SquMatrixType type, unsigned long size) |
Set type and size of square matrix. | |
Gan_SquMatrix_f * | gan_squmatf_fill_vap (Gan_SquMatrix_f *A, Gan_SquMatrixType type, unsigned long size, va_list *aptr) |
Fill square matrix from variable argument list. | |
Gan_SquMatrix_f * | gan_squmatf_fill_const_q (Gan_SquMatrix_f *A, Gan_SquMatrixType type, unsigned long size, float value) |
Fill square matrix with constant value. | |
size_t | gan_squmatf_data_size (Gan_SquMatrixType type, unsigned long size) |
Returns size of data array needed to create a matrix of given type & size. | |
Gan_SquMatrix_f * | gan_squmatf_fscanf_q (FILE *fp, Gan_SquMatrix_f *A, char *prefix, int prefix_len) |
Read square matrix from ASCII file. | |
Gan_Bool | gan_squmatf_fwrite (FILE *fp, Gan_SquMatrix_f *A, gan_ui32 magic_number) |
Write square matrix to binary file. | |
Gan_SquMatrix_f * | gan_squmatf_fread_q (FILE *fp, Gan_SquMatrix_f *A, gan_ui32 *magic_number) |
Read square matrix from binary file. | |
Gan_SquMatrix_f * | gan_squmatf_form_gen (Gan_SquMatrix_f *A, Gan_SquMatrixType type, unsigned long size, float *data, size_t data_size) |
void | gan_squmatf_free_func (Gan_SquMatrix_f *A) |
Gan_SquMatrix_f * | gan_symmatf_set_size (Gan_SquMatrix_f *A, unsigned long size) |
Set square matrix to be symmetric with given size. | |
Gan_SquMatrix_f * | gan_symmatf_fill_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Fill symmetric matrix from variable argument list. | |
Gan_SquMatrix_f * | gan_symmatf_fill_const_q (Gan_SquMatrix_f *A, unsigned long size, float value) |
Fill symmetric matrix with constant value, and set its size. | |
Gan_Bool | gan_symmatf_read_va (Gan_SquMatrix_f *A, unsigned long size,...) |
Read the elements of a symmetric matrix into pointers. | |
Gan_SquMatrix_f * | gan_symmatf_insertsym (Gan_SquMatrix_f *A, unsigned long rA, Gan_SquMatrix_f *B, unsigned long rB, unsigned long size) |
Insert diagonal part of symmetric matrix in symmetric matrix. | |
Gan_SquMatrix_f * | gan_symmatf_insertsym_od (Gan_SquMatrix_f *A, unsigned long rA, unsigned long cA, Gan_SquMatrix_f *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Insert off-diagonal part of symmetric matrix in symmetric matrix. | |
Gan_Bool | gan_symmatf_eigen (Gan_SquMatrix_f *A, Gan_SquMatrix_f *W, struct Gan_Matrix_f *Z, Gan_Bool sort, float *work, unsigned long work_size) |
Gan_SquMatrix_f * | gan_symmatf_form_gen (Gan_SquMatrix_f *A, unsigned long size, float *data, size_t data_size) |
Gan_SquMatrix_f * | gan_symmatf_fill_vap (Gan_SquMatrix_f *A, unsigned long size, va_list *aptr) |
Fill symmetric matrix with values from variable argument list. | |
Gan_SquMatrix_f * | gan_symmatf_insert_gen (Gan_SquMatrix_f *S, unsigned long rS, unsigned long cS, struct Gan_Matrix_f *B, Gan_TposeFlag B_tr, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Gan_SquMatrix_f * | gan_symmatf_insertv_gen (Gan_SquMatrix_f *A, unsigned long rA, unsigned long cA, struct Gan_Vector_f *x, Gan_TposeFlag x_tr, unsigned long rx, unsigned long size) |
Gan_SquMatrix_f * | gan_ltmatf_set_size (Gan_SquMatrix_f *L, unsigned long size) |
Set square matrix to be lower triangular with given size. | |
Gan_SquMatrix_f * | gan_utmatf_set_size (Gan_SquMatrix_f *U, unsigned long size) |
Set square matrix to be upper triangular with given size. | |
Gan_SquMatrix_f * | gan_ltmatf_fill_va (Gan_SquMatrix_f *L, unsigned long size,...) |
Fill a lower triangular matrix with values. | |
Gan_SquMatrix_f * | gan_utmatf_fill_va (Gan_SquMatrix_f *U, unsigned long size,...) |
Fill an upper triangular matrix with values. | |
Gan_SquMatrix_f * | gan_ltmatf_fill_const_q (Gan_SquMatrix_f *L, unsigned long size, float value) |
Fill a lower triangular matrix with a constant value. | |
Gan_SquMatrix_f * | gan_utmatf_fill_const_q (Gan_SquMatrix_f *U, unsigned long size, float value) |
Fill a upper triangular matrix with a constant value. | |
Gan_Bool | gan_ltmatf_read_va (Gan_SquMatrix_f *L, unsigned long size,...) |
Read the elements of a lower triangular matrix into pointers. | |
Gan_Bool | gan_utmatf_read_va (Gan_SquMatrix_f *U, unsigned long size,...) |
Read the elements of an upper triangular matrix into pointers. | |
Gan_SquMatrix_f * | gan_ltmatf_form_gen (Gan_SquMatrix_f *A, unsigned long size, float *data, size_t data_size) |
Gan_SquMatrix_f * | gan_utmatf_form_gen (Gan_SquMatrix_f *A, unsigned long size, float *data, size_t data_size) |
Gan_SquMatrix_f * | gan_ltmatf_fill_vap (Gan_SquMatrix_f *L, unsigned long size, va_list *aptr) |
Fills a lower triangular matrix with values. | |
Gan_SquMatrix_f * | gan_utmatf_fill_vap (Gan_SquMatrix_f *U, unsigned long size, va_list *aptr) |
Fills an upper triangular matrix with values. |
|
Whether or not matrix is (to be) inverted.
|
|
Whether product is on left or right side.
|
|
Types of square matrix.
|
|
Whether or not matrix is (to be) transposed.
|
|
Whether triangular matrix is unit along the diagonal.
|
|
Whether matrix is upper or lower triangular.
|
|
Threshold small diagonal elements of a diagonal matrix.
The array x of state vectors specifies any redundant parameters in each block.
The contents of indexptr and elptr, if not |
|
Fill a diagonal matrix with constant value.
|
|
Fill diagonal matrix from variable argument list.
|
|
Fill diagonal matrix with values from variable argument list. Fill diagonal matrix A with values from variable argument list aptr, and set the size of A to size. |
|
Invert the elements of diagonal matrix.
|
|
Read the elements of a diagonal matrix into pointers. Reads all the diagonal element values of the given diagonal matrix A into the variable argument list of pointers to double. The size argument must match the size of the matrix. |
|
Set square matrix to be diagonal with given size.
|
|
Threshold small diagonal elements of a diagonal matrix.
The array x of state vectors specifies any redundant parameters in each block.
The contents of indexptr and elptr, if not |
|
Fill a diagonal matrix with constant value.
|
|
Fill diagonal matrix from variable argument list. Fill diagonal matrix A with values from variable argument list, and set the size of A to size. |
|
Fill diagonal matrix with values from variable argument list. Fill diagonal matrix A with values from variable argument list aptr, and set the size of A to size. |
|
Invert the elements of diagonal matrix.
|
|
Read the elements of a diagonal matrix into pointers. Reads all the diagonal element values of the given diagonal matrix A into the variable argument list of pointers to double. The size argument must match the size of the matrix. |
|
Set square matrix to be diagonal with given size.
|
|
Fill a lower triangular matrix with a constant value.
|
|
Fill a lower triangular matrix with values.
|
|
Fills a lower triangular matrix with values.
|
|
Read the elements of a lower triangular matrix into pointers. Read the elements of a lower triangular matrix L into pointers from a variable argument list. The size argument must match the size of the matrix L. |
|
Set square matrix to be lower triangular with given size.
|
|
Fill a lower triangular matrix with a constant value.
|
|
Fill a lower triangular matrix with values.
|
|
Fills a lower triangular matrix with values.
|
|
Read the elements of a lower triangular matrix into pointers. Read the elements of a lower triangular matrix L into pointers from a variable argument list. The size argument must match the size of the matrix L. |
|
Set square matrix to be lower triangular with given size.
|
|
Add general size matrices.
Add two matrices A, B, each of which may be transposed, and write result into |
|
Add general size matrices producing a symmetric matrix.
Add two matrices A, B and write result into |
|
Copy matrix. Copy matrix A to matrix B, and return B. |
|
Divide matrix by scalar. Divide matrix A by scalar a into matrix B, and return B. |
|
Extracts rectangular part of matrix.
NULL, the output matrix is allocated inside the function, and then returned.
|
|
Fill all elements of a matrix with the same value.
|
|
Fill matrix from variable argument list.
|
|
Fill matrix from variable argument list.
|
|
Returns Frobenius norm of generic rectangular matrix.
|
|
Print matrix to file pointer. Print matrix A to file pointer fp, with prefix string prefix, indentation indent and floating-point format fmt.
|
|
Read matrix from file in binary format.
Read matrix A from file pointer fp in binary format. The magic number is read into the provided pointer. A should either be a pre-allocated matrix pointer or
|
|
Free a matrix. Free a generic rectangular matrix A. |
|
Free a
Free a |
|
Read matrix from file.
Read matrix A from file pointer fp. The prefix string for the matrix is read from the file into the prefix string, up to the maximum length prefix_len of the prefix string. Any remaining characters after "prefix" has been filled are ignored. Pass
|
|
Print matrix to binary file pointer. Print matrix A to file pointer fp in binary format, with 32-bit magic number printed first.
|
|
Insert part of generic matrix in another generic matrix. Fills a rectangular part of generic matrix A starting at row,column position rA, cA and rows by cols in size with the section of generic matrix B, starting at position rB, cB. |
|
Inverts general square matrix.
|
|
Multiply matrix and a vector.
Multiply matrix A and vector x, A being optionally transposed, writing the result into another vector
|
|
Read elements of matrix from variable argument list.
|
|
Multiply matrix by scalar. Rescale matrix A by scalar a into matrix B, and return B. |
|
Set dimensions of generic matrix. Set dimensions of generic matrix A to rows by cols. |
|
Subtract general size matrices.
Subtract two matrices A, B, each of which may be implicitly transposed, and write result into |
|
Returns squared Frobenius norm of generic rectangular matrix.
|
|
Transpose matrix. Function to transpose generic matrix A into another matrix B. |
|
Add general size matrices.
Add two matrices A, B, each of which may be transposed, and write result into |
|
Add general size matrices producing a symmetric matrix.
Add two matrices A, B and write result into |
|
Copy matrix. Copy matrix A to matrix B, and return B. |
|
Divide matrix by scalar. Divide matrix A by scalar a into matrix B, and return B. |
|
Extracts rectangular part of matrix.
NULL, the output matrix is allocated inside the function, and then returned.
|
|
Fill all elements of a matrix with the same value.
|
|
Fill matrix from variable argument list.
|
|
Fill matrix from variable argument list.
|
|
Returns Frobenius norm of generic rectangular matrix.
|
|
Print matrix to file pointer. Print matrix A to file pointer fp, with prefix string prefix, indentation indent and floating-point format fmt.
|
|
Read matrix from file in binary format.
Read matrix A from file pointer fp in binary format. The magic number is read into the provided pointer. A should either be a pre-allocated matrix pointer or
|
|
Free a matrix. Free a generic rectangular matrix A. |
|
Free a
Free a |
|
Read matrix from file.
Read matrix A from file pointer fp. The prefix string for the matrix is read from the file into the prefix string, up to the maximum length prefix_len of the prefix string. Any remaining characters after "prefix" has been filled are ignored. Pass
|
|
Print matrix to binary file pointer. Print matrix A to file pointer fp in binary format, with 32-bit magic number printed first.
|
|
Insert part of generic matrix in another generic matrix. Fills a rectangular part of generic matrix A starting at row,column position rA, cA and rows by cols in size with the section of generic matrix B, starting at position rB, cB. |
|
Inverts general square matrix.
|
|
Multiply matrix and a vector.
Multiply matrix A and vector x, A being optionally transposed, writing the result into another vector
|
|
Read elements of matrix from variable argument list.
|
|
Multiply matrix by scalar. Rescale matrix A by scalar a into matrix B, and return B. |
|
Set dimensions of generic matrix. Set dimensions of generic matrix A to rows by cols. |
|
Subtract general size matrices.
Subtract two matrices A, B, each of which may be implicitly transposed, and write result into |
|
Returns squared Frobenius norm of generic rectangular matrix.
|
|
Transpose matrix. Function to transpose generic matrix A into another matrix B. |
|
Fill a scaled identity matrix with constant value.
|
|
Fill multiple of the identity matrix from variable argument list.
|
|
Fill multiple of identity matrix using variable argument list.
|
|
Read the elements of a scaled identity matrix into pointers. Reads the single value of the given multiple of identity matrix A into the variable argument list of pointers to double. Of course in this case the variable argument list should contain exactly one pointer. The size argument must match the size of the matrix. |
|
Set square matrix to be multiple of identity with given size.
|
|
Fill a scaled identity matrix with constant value.
|
|
Fill multiple of the identity matrix from variable argument list.
|
|
Fill multiple of identity matrix using variable argument list.
|
|
Read the elements of a scaled identity matrix into pointers. Reads the single value of the given multiple of identity matrix A into the variable argument list of pointers to double. Of course in this case the variable argument list should contain exactly one pointer. The size argument must match the size of the matrix. |
|
Set square matrix to be multiple of identity with given size.
|
|
Returns size of data array needed to create a matrix of given type & size. Returns size of data array needed to create a square matrix of given type & size. |
|
Fill square matrix with constant value.
|
|
Fill square matrix from variable argument list.
|
|
Read square matrix from binary file.
|
|
Function to free square matrix.
|
|
Free a NULL-terminated variable argument list of square matrices.
NULL-terminated variable argument list of square matrices, starting with matrix A. |
|
Read square matrix from ASCII file.
|
|
Write square matrix to binary file. Write square matrix A in binary format to file pointer fp. The provided magic number is written as a prefix.
|
|
Set type and size of square matrix.
|
|
Returns size of data array needed to create a matrix of given type & size. Returns size of data array needed to create a square matrix of given type & size. |
|
Fill square matrix with constant value.
|
|
Fill square matrix from variable argument list.
|
|
Read square matrix from binary file.
|
|
Function to free square matrix.
|
|
Free a NULL-terminated variable argument list of square matrices.
NULL-terminated variable argument list of square matrices, starting with matrix A. |
|
Read square matrix from ASCII file.
|
|
Write square matrix to binary file. Write square matrix A in binary format to file pointer fp. The provided magic number is written as a prefix.
|
|
Set type and size of square matrix.
|
|
Fill symmetric matrix with constant value, and set its size.
|
|
Fill symmetric matrix from variable argument list.
|
|
Fill symmetric matrix with values from variable argument list.
|
|
Insert diagonal part of symmetric matrix in symmetric matrix.
|
|
Insert off-diagonal part of symmetric matrix in symmetric matrix.
|
|
Read the elements of a symmetric matrix into pointers. The size argument must match the size of the matrix A. |
|
Set square matrix to be symmetric with given size.
|
|
Fill symmetric matrix with constant value, and set its size.
|
|
Fill symmetric matrix from variable argument list.
|
|
Fill symmetric matrix with values from variable argument list.
|
|
Insert diagonal part of symmetric matrix in symmetric matrix.
|
|
Insert off-diagonal part of symmetric matrix in symmetric matrix.
|
|
Read the elements of a symmetric matrix into pointers. The size argument must match the size of the matrix A. |
|
Set square matrix to be symmetric with given size.
|
|
Fill a upper triangular matrix with a constant value.
|
|
Fill an upper triangular matrix with values.
|
|
Fills an upper triangular matrix with values.
|
|
Read the elements of an upper triangular matrix into pointers. Read the elements of an upper triangular matrix U into pointers from a variable argument list. The size argument must match the size of the matrix U. |
|
Set square matrix to be upper triangular with given size.
|
|
Fill a upper triangular matrix with a constant value.
|
|
Fill an upper triangular matrix with values.
|
|
Fills an upper triangular matrix with values.
|
|
Read the elements of an upper triangular matrix into pointers. Read the elements of an upper triangular matrix U into pointers from a variable argument list. The size argument must match the size of the matrix U. |
|
Set square matrix to be upper triangular with given size.
|