Modules | |
group | Access an Element of a General Size Matrix |
group | Threshold Elements of a General Size Matrix |
group | Eigendecomposition of a General Size Matrix |
group | Test a General Size Matrix |
group | Norms of a General Size Matrix |
group | Invert a General Size Matrix |
group | Fill a General Size Matrix with Values |
group | Read Elements of a General Size Matrix |
group | Copy a General Size Matrix |
group | Multiply/Divide a General Size Matrix by a Scalar |
group | Transpose a General Size Matrix |
group | Add General Size Matrices |
group | Subtract General Size Matrices |
group | General Size Matrix/Vector Product |
group | General Size Matrix/Matrix Product |
group | Insert Part of a General Size Matrix in Another |
group | Extract Part of a General Size Matrix |
group | General Size Matrix I/O |
group | Set Attributes of a General Size Matrix |
group | Get Dimensions of General Size Matrix |
group | Allocate/Free a General Size Matrix |
group | LQ Decomposition of a General Size Matrix |
group | QR Decomposition of a General Size Matrix |
group | General Size Matrix Triple Product |
group | Cholesky Factorisation of a General Size Matrix |
group | Convert a General Size Matrix |
group | Singular Value Decomposition of a General Size Matrix |
group | Pseudo-Inverse of a General Size Matrix |
Classes | |
struct | Gan_Matrix |
Structure definition for double precision general size matrix. More... | |
struct | Gan_SquMatrixFuncs |
Structure containing type-specific functions. More... | |
struct | Gan_SquMatrix |
Structure definition for double precision general size square matrix. More... | |
struct | Gan_Matrix_f |
Structure definition for single precision general size matrix. More... | |
struct | Gan_SquMatrixFFuncs |
Structure containing type-specific functions. More... | |
struct | Gan_SquMatrix_f |
Structure definition for single precision general size square matrix. More... | |
Defines | |
#define | GAN_MATRIX_STRUCT_DEFINED |
#define | Gan_SquMatrix struct Gan_SquMatrix |
#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_SquMatrix_f struct Gan_SquMatrix_f |
#define | gan_matf_realloc(A, rows, cols) gan_matf_realloc_gen(A,rows,cols) |
#define | GAN_SQUMATRIXF_STRUCT_DEFINED |
Typedefs | |
typedef enum Gan_LapackLamchFlag | Gan_LapackLamchFlag |
Type of test in lamch functions. | |
typedef enum Gan_LapackNormType | Gan_LapackNormType |
Type of norm in lansp functions. | |
typedef enum Gan_LapackPlaneRotationType | Gan_LapackPlaneRotationType |
Plane rotation type. | |
typedef enum Gan_LapackPlaneRotationDirection | Gan_LapackPlaneRotationDirection |
Plane rotation direction. | |
typedef enum Gan_LapackPivotType | Gan_LapackPivotType |
Pivot type. | |
typedef enum Gan_LapackSortOrder | Gan_LapackSortOrder |
Sort order. | |
typedef enum Gan_LapackEvecType | Gan_LapackEvecType |
Type of eigenvector calculation. | |
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_LapackUpLoFlag { GAN_MATRIXPART_LOWER, GAN_MATRIXPART_UPPER, GAN_MATRIXPART_WHOLE } |
Whether matrix is upper or lower triangular. More... | |
enum | Gan_LapackMatStorage { GAN_MATSTORAGE_FULL, GAN_MATSTORAGE_LOWERTRIANGULAR, GAN_MATSTORAGE_UPPERTRIANGULAR, GAN_MATSTORAGE_UPPERHESSENBERG, GAN_MATSTORAGE_SYMMBANDLOWER, GAN_MATSTORAGE_SYMMBANDUPPER, GAN_MATSTORAGE_BAND } |
Matrix storage type. More... | |
enum | Gan_LapackUnitFlag { GAN_NOUNIT = 0, GAN_UNIT = 1 } |
Whether triangular matrix is unit along the diagonal. More... | |
enum | Gan_LapackLamchFlag { GAN_LAMCH_EPS, GAN_LAMCH_SFMIN, GAN_LAMCH_BASE, GAN_LAMCH_PREC, GAN_LAMCH_T, GAN_LAMCH_RND, GAN_LAMCH_EMIN, GAN_LAMCH_RMIN, GAN_LAMCH_EMAX, GAN_LAMCH_RMAX } |
Type of test in lamch functions. More... | |
enum | Gan_LapackNormType { GAN_NORMTYPE_MAXABSVAL, GAN_NORMTYPE_ONE, GAN_NORMTYPE_INFINITY, GAN_NORMTYPE_FROBENIUS } |
Type of norm in lansp functions. More... | |
enum | Gan_LapackPlaneRotationType { GAN_PLANEROTATION_LEFT, GAN_PLANEROTATION_RIGHT } |
Plane rotation type. | |
enum | Gan_LapackPlaneRotationDirection { GAN_PLANEROTATIONDIRECTION_FORWARDS, GAN_PLANEROTATIONDIRECTION_BACKWARDS } |
Plane rotation direction. | |
enum | Gan_LapackPivotType { GAN_PIVOTTYPE_VARIABLE, GAN_PIVOTTYPE_TOP, GAN_PIVOTTYPE_BOTTOM } |
Pivot type. | |
enum | Gan_LapackSortOrder { GAN_SORTORDER_INCREASING, GAN_SORTORDER_DECREASING } |
Sort order. | |
enum | Gan_LapackEvecType { GAN_EVECTYPE_EVALSONLY, GAN_EVECTYPE_EVECSORIGINAL, GAN_EVECTYPE_EVECSTRIDIAGONAL } |
Type of eigenvector calculation. More... | |
enum | Gan_LapackSideFlag { 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 (const 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 (const 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 (const 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 (const Gan_Matrix *A, unsigned long rows, unsigned long cols,...) |
Read elements of matrix from variable argument list. | |
Gan_Matrix * | gan_mat_copy_q (const 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, const struct Gan_SquMatrix *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols) |
Gan_Bool | gan_mat_is_zero (Gan_Matrix *A) |
Checks whether a matrix is zero. | |
void | gan_mat_free_va (Gan_Matrix *A,...) |
Free a NULL terminated variable argument list of matrices. | |
Gan_Matrix * | gan_mat_extract_q (const 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 (const Gan_Matrix *A) |
Returns squared Frobenius norm of generic rectangular matrix. | |
double | gan_mat_Fnorm (const Gan_Matrix *A) |
Returns Frobenius norm of generic rectangular matrix. | |
Gan_Matrix * | gan_mat_invert_q (const Gan_Matrix *A, Gan_Matrix *B) |
Inverts general square matrix. | |
Gan_Bool | gan_mat_fprint (FILE *fp, const 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, const Gan_Matrix *A, gan_uint32 magic_number) |
Print matrix to binary file pointer. | |
Gan_Matrix * | gan_mat_fread_q (FILE *fp, Gan_Matrix *A, gan_uint32 *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 (const Gan_Matrix *A, Gan_TposeFlag A_tr, const 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 (const Gan_Matrix *A, Gan_TposeFlag A_tr, const Gan_Vector *x, Gan_Vector *y) |
Multiply matrix and a vector. | |
Gan_Matrix * | gan_mat_rmult_gen (const Gan_Matrix *A, Gan_TposeFlag A_tr, const Gan_Matrix *B, Gan_TposeFlag B_tr, Gan_Matrix *C) |
Gan_SquMatrix * | gan_mat_rmult_sym_gen (const Gan_Matrix *A, Gan_TposeFlag A_tr, const 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, const 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, const 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 (const 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 (const 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, const Gan_SquMatrix *A, gan_uint32 magic_number) |
Write square matrix to binary file. | |
Gan_SquMatrix * | gan_squmat_fread_q (FILE *fp, Gan_SquMatrix *A, gan_uint32 *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 (const 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, const 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, const 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, const 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, const 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 (const Gan_SquMatrix *L, unsigned long size,...) |
Read the elements of a lower triangular matrix into pointers. | |
Gan_Bool | gan_utmat_read_va (const 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 (const 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 (const 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 (const 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 (const 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 (const 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_Bool | gan_matf_is_zero (Gan_Matrix_f *A) |
Checks whether a matrix is zero. | |
Gan_Matrix_f * | gan_matf_insertsym (Gan_Matrix_f *A, unsigned long rA, unsigned long cA, const 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 (const 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 (const Gan_Matrix_f *A) |
Returns squared Frobenius norm of generic rectangular matrix. | |
float | gan_matf_Fnorm (const Gan_Matrix_f *A) |
Returns Frobenius norm of generic rectangular matrix. | |
Gan_Matrix_f * | gan_matf_invert_q (const Gan_Matrix_f *A, Gan_Matrix_f *B) |
Inverts general square matrix. | |
Gan_Bool | gan_matf_fprint (FILE *fp, const 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, const Gan_Matrix_f *A, gan_uint32 magic_number) |
Print matrix to binary file pointer. | |
Gan_Matrix_f * | gan_matf_fread_q (FILE *fp, Gan_Matrix_f *A, gan_uint32 *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 (const Gan_Matrix_f *A, Gan_TposeFlag A_tr, const 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 (const Gan_Matrix_f *A, Gan_TposeFlag A_tr, const Gan_Vector_f *x, Gan_Vector_f *y) |
Multiply matrix and a vector. | |
Gan_Matrix_f * | gan_matf_rmult_gen (const Gan_Matrix_f *A, Gan_TposeFlag A_tr, const Gan_Matrix_f *B, Gan_TposeFlag B_tr, Gan_Matrix_f *C) |
Gan_SquMatrix_f * | gan_matf_rmult_sym_gen (const Gan_Matrix_f *A, Gan_TposeFlag A_tr, const 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, const 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, const 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 (const 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 (const 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, const Gan_SquMatrix_f *A, gan_uint32 magic_number) |
Write square matrix to binary file. | |
Gan_SquMatrix_f * | gan_squmatf_fread_q (FILE *fp, Gan_SquMatrix_f *A, gan_uint32 *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 (const 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, const 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, const 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, const 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, const 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 (const Gan_SquMatrix_f *L, unsigned long size,...) |
Read the elements of a lower triangular matrix into pointers. | |
Gan_Bool | gan_utmatf_read_va (const 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.
|
|
Type of eigenvector calculation.
|
|
|
Matrix storage type.
|
|
Type of norm in lansp functions.
|
|
Whether product is on left or right side.
|
|
Whether triangular matrix is unit along the diagonal.
|
|
Whether matrix is upper or lower triangular.
|
|
Types of square matrix.
|
|
Whether or not matrix is (to be) transposed.
|
|
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 , which is returned. Transposing A or B does not affect A or B, only the result C. |
|
Add general size matrices producing a symmetric matrix. Add two matrices A, B and write result into , which is returned. C is square and is assumed to be symmetric. No checking of this assumption is done. A and B may both be optionally implicitly transposed. |
|
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.
|
|
Checks whether a matrix is zero.
|
|
Multiply matrix and a vector. Multiply matrix A and vector x, A being optionally transposed, writing the result into another vector .
|
|
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 , which is returned. |
|
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 , which is returned. Transposing A or B does not affect A or B, only the result C. |
|
Add general size matrices producing a symmetric matrix. Add two matrices A, B and write result into , which is returned. C is square and is assumed to be symmetric. No checking of this assumption is done. A and B may both be optionally implicitly transposed. |
|
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.
|
|
Checks whether a matrix is zero.
|
|
Multiply matrix and a vector. Multiply matrix A and vector x, A being optionally transposed, writing the result into another vector .
|
|
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 , which is returned. |
|
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.
|