00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MAT_DIAGONAL_H
00030 #define _GAN_MAT_DIAGONAL_H
00031
00032 #include <gandalf/linalg/mat_square.h>
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00054
00055 Gan_SquMatrix *gan_diagmat_set_size ( Gan_SquMatrix *A, unsigned long size );
00056 Gan_SquMatrix *gan_diagmat_fill_va ( Gan_SquMatrix *A,
00057 unsigned long size, ... );
00058 Gan_SquMatrix *gan_diagmat_fill_const_q ( Gan_SquMatrix *A,
00059 unsigned long size, double value );
00060 Gan_Bool gan_diagmat_read_va ( const Gan_SquMatrix *A, unsigned long size, ... );
00061 Gan_SquMatrix *gan_diagmat_diag_thres ( Gan_SquMatrix *A, unsigned null_space,
00062 double thres, int *indexptr,
00063 double **elptr );
00064 Gan_SquMatrix *gan_diagmat_inv_diag_thres ( Gan_SquMatrix *A,
00065 unsigned null_space,
00066 double thres );
00067 struct Gan_Matrix *gan_diagmatI_lmult_inf_q ( const Gan_SquMatrix *A,
00068 struct Gan_Matrix *B,
00069 struct Gan_Matrix *C );
00070
00084 Gan_SquMatrix *gan_diagmat_alloc ( unsigned long size );
00085
00097 Gan_SquMatrix *gan_diagmat_form ( Gan_SquMatrix *A, unsigned long size );
00098
00111 Gan_SquMatrix *gan_diagmat_form_data ( Gan_SquMatrix *A, unsigned long size,
00112 double *data, size_t data_size );
00113
00133 Gan_SquMatrix *
00134 gan_diagmat_fill_const_s ( unsigned long size, double value );
00135
00146 Gan_SquMatrix *
00147 gan_diagmat_fill_zero_q ( Gan_SquMatrix *A, unsigned long size );
00148
00158 Gan_SquMatrix *
00159 gan_diagmat_fill_zero_s ( unsigned long size );
00160
00179 Gan_Matrix *gan_diagmatI_lmult_inf_s ( const Gan_SquMatrix *A, Gan_Matrix *B );
00180
00190 Gan_Matrix *gan_diagmatI_lmult_inf_i ( const Gan_SquMatrix *A, Gan_Matrix *B );
00191
00196
00197 Gan_SquMatrix *gan_diagmat_form_gen ( Gan_SquMatrix *A, unsigned long size,
00198 double *data, size_t data_size );
00199 Gan_SquMatrix *gan_diagmat_fill_vap ( Gan_SquMatrix *A,
00200 unsigned long size, va_list *aptr );
00201
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217
00218 #endif