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 ( Gan_SquMatrix *A, unsigned long size,
00061 ... );
00062 Gan_SquMatrix *gan_diagmat_diag_thres ( Gan_SquMatrix *A, unsigned null_space,
00063 double thres, int *indexptr,
00064 double **elptr );
00065 Gan_SquMatrix *gan_diagmat_inv_diag_thres ( Gan_SquMatrix *A,
00066 unsigned null_space,
00067 double thres );
00068 struct Gan_Matrix *gan_diagmatI_lmult_inf_q ( Gan_SquMatrix *A,
00069 struct Gan_Matrix *B,
00070 struct Gan_Matrix *C );
00071
00085 Gan_SquMatrix *gan_diagmat_alloc ( unsigned long size );
00086
00098 Gan_SquMatrix *gan_diagmat_form ( Gan_SquMatrix *A, unsigned long size );
00099
00112 Gan_SquMatrix *gan_diagmat_form_data ( Gan_SquMatrix *A, unsigned long size,
00113 void *data, size_t data_size );
00114
00134 Gan_SquMatrix *
00135 gan_diagmat_fill_const_s ( unsigned long size, double value );
00136
00147 Gan_SquMatrix *
00148 gan_diagmat_fill_zero_q ( Gan_SquMatrix *A, unsigned long size );
00149
00159 Gan_SquMatrix *
00160 gan_diagmat_fill_zero_s ( unsigned long size );
00161
00180 void gan_diagmatI_lmult_inf_s ( Gan_SquMatrix *A, Gan_Matrix *B );
00181
00191 void gan_diagmatI_lmult_inf_i ( Gan_SquMatrix *A, Gan_Matrix *B );
00192
00197
00198 Gan_SquMatrix *gan_diagmat_form_gen ( Gan_SquMatrix *A, unsigned long size,
00199 double *data, size_t data_size );
00200 Gan_SquMatrix *gan_diagmat_fill_vap ( Gan_SquMatrix *A,
00201 unsigned long size, va_list *aptr );
00202
00215 #ifdef __cplusplus
00216 }
00217 #endif
00218
00219 #endif