Main Page | Modules | Class List | File List | Class Members | File Members

mat_gen.c File Reference

#include <stdarg.h>
#include <gandalf/linalg/mat_gen.h>
#include <gandalf/linalg/vec_gen.h>
#include <gandalf/linalg/mat_symmetric.h>
#include <gandalf/linalg/matvec_blas.h>
#include <gandalf/linalg/matvec_clapack.h>
#include <gandalf/linalg/clapack.h>
#include <gandalf/linalg/cblas.h>
#include <gandalf/common/allocate.h>
#include <gandalf/common/misc_error.h>
#include <gandalf/common/numerics.h>
#include <gandalf/common/array.h>
#include <gandalf/common/endian_io.h>

Functions

Gan_Bool gan_mat_realloc_gen (Gan_Matrix *A, unsigned long rows, unsigned long cols)
void gan_mat_free (Gan_Matrix *A)
 Free a matrix.
Gan_Bool gan_mat_is_zero (Gan_Matrix *A)
 Checks whether a matrix is zero.
Gan_Matrixgan_mat_set_dims (Gan_Matrix *A, unsigned long rows, unsigned long cols)
 Set dimensions of generic 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_Matrixgan_mat_invert_q (const Gan_Matrix *A, Gan_Matrix *B)
 Inverts general square matrix.
Gan_Matrixgan_mat_fill_va (Gan_Matrix *A, unsigned long rows, unsigned long cols,...)
 Fill matrix from variable argument list.
Gan_Matrixgan_mat_fill_vap (Gan_Matrix *A, unsigned long rows, unsigned long cols, va_list *aptr)
 Fill matrix from variable argument list.
Gan_Matrixgan_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_Matrixgan_mat_copy_q (const Gan_Matrix *A, Gan_Matrix *B)
 Copy matrix.
Gan_Matrixgan_mat_scale_q (Gan_Matrix *A, double a, Gan_Matrix *B)
 Multiply matrix by scalar.
Gan_Matrixgan_mat_divide_q (Gan_Matrix *A, double a, Gan_Matrix *B)
 Divide matrix by scalar.
Gan_Matrixgan_mat_tpose_q (Gan_Matrix *A, Gan_Matrix *B)
 Transpose matrix.
Gan_Matrixgan_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_SquMatrixgan_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_Matrixgan_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_Vectorgan_mat_multv_gen (const Gan_Matrix *A, Gan_TposeFlag A_tr, const Gan_Vector *x, Gan_Vector *y)
 Multiply matrix and a vector.
Gan_Matrixgan_mat_rmult_gen (const Gan_Matrix *A, Gan_TposeFlag A_tr, const Gan_Matrix *B, Gan_TposeFlag B_tr, Gan_Matrix *C)
Gan_SquMatrixgan_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_Matrixgan_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_Matrixgan_mat_insertv_gen (Gan_Matrix *A, unsigned long rA, unsigned long cA, const Gan_Vector *x, Gan_TposeFlag x_tr, unsigned long rx, unsigned long size)
 Insert part of column vector in a generic matrix.
Gan_Matrixgan_mat_insertsym (Gan_Matrix *A, unsigned long rA, unsigned long cA, const Gan_SquMatrix *B, unsigned long rB, unsigned long cB, unsigned long rows, unsigned long cols)
 Insert part of symmetric matrix in a generic matrix.
void gan_mat_free_va (Gan_Matrix *A,...)
 Free a NULL terminated variable argument list of matrices.
Gan_Matrixgan_mat_form_gen (Gan_Matrix *A, unsigned long rows, unsigned long cols, double *data, size_t data_size)
Gan_Matrixgan_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.
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_Matrixgan_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_Matrixgan_mat_fread_q (FILE *fp, Gan_Matrix *A, gan_uint32 *magic_number)
 Read matrix from file in binary format.
void gan_mat_db (const Gan_Matrix *A)

Detailed Description

Module: Generic rectangular matrices (double precision)

Part of: Gandalf Library

Version:
1.45
Date:
2006/03/15 15:16:09
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:52 2006 by  doxygen 1.3.9.1