00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MAT_SYMMETRIC_H
00030 #define _GAN_MAT_SYMMETRIC_H
00031
00032 #include <gandalf/linalg/mat_square.h>
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00054
00055 Gan_SquMatrix *gan_symmat_set_size ( Gan_SquMatrix *A, unsigned long size );
00056 Gan_SquMatrix *gan_symmat_fill_va ( Gan_SquMatrix *A,
00057 unsigned long size, ... );
00058 Gan_SquMatrix *gan_symmat_fill_const_q ( Gan_SquMatrix *A,
00059 unsigned long size, double value );
00060 Gan_Bool gan_symmat_read_va ( const Gan_SquMatrix *A, unsigned long size, ... );
00061 Gan_SquMatrix *gan_symmat_insertsym ( Gan_SquMatrix *A, unsigned long rA,
00062 const Gan_SquMatrix *B, unsigned long rB,
00063 unsigned long size );
00064 Gan_SquMatrix *gan_symmat_insertsym_od ( Gan_SquMatrix *A,
00065 unsigned long rA, unsigned long cA,
00066 const Gan_SquMatrix *B,
00067 unsigned long rB, unsigned long cB,
00068 unsigned long rows,
00069 unsigned long cols );
00070 Gan_Bool gan_symmat_eigen ( Gan_SquMatrix *A,
00071 Gan_SquMatrix *W, struct Gan_Matrix *Z,
00072 Gan_Bool sort,
00073 double *work, unsigned long work_size );
00074
00088 Gan_SquMatrix *gan_symmat_alloc ( unsigned long size );
00089
00101 Gan_SquMatrix *gan_symmat_form ( Gan_SquMatrix *A, unsigned long size );
00102
00115 Gan_SquMatrix *gan_symmat_form_data ( Gan_SquMatrix *A, unsigned long size,
00116 double *data, size_t data_size );
00117
00138 Gan_SquMatrix *
00139 gan_symmat_fill_const_s ( unsigned long size, double value );
00140
00151 Gan_SquMatrix *
00152 gan_symmat_fill_zero_q ( Gan_SquMatrix *A, unsigned long size );
00153
00163 Gan_SquMatrix *
00164 gan_symmat_fill_zero_s ( unsigned long size );
00165
00183 Gan_SquMatrix *gan_symmat_insert ( Gan_SquMatrix *S,
00184 unsigned long rS, unsigned long cS,
00185 const Gan_Matrix *B,
00186 unsigned long rB, unsigned long cB,
00187 unsigned long rows, unsigned long cols );
00188
00197 Gan_SquMatrix *gan_symmat_insertT ( Gan_SquMatrix *S,
00198 unsigned long rS, unsigned long cS,
00199 const Gan_Matrix *B,
00200 unsigned long rB, unsigned long cB,
00201 unsigned long rows, unsigned long cols );
00202
00211 Gan_SquMatrix *gan_symmat_insertv ( Gan_SquMatrix *A,
00212 unsigned long rA, unsigned long cA,
00213 const Gan_Vector *x, unsigned long rx,
00214 unsigned long rows );
00215
00225 Gan_SquMatrix *gan_symmat_insertvT ( Gan_SquMatrix *A,
00226 unsigned long rA, unsigned long cA,
00227 const Gan_Vector *x, unsigned long rx,
00228 unsigned long cols );
00229
00234
00235 Gan_SquMatrix *gan_symmat_form_gen ( Gan_SquMatrix *A, unsigned long size,
00236 double *data, size_t data_size );
00237 Gan_SquMatrix *gan_symmat_fill_vap ( Gan_SquMatrix *A,
00238 unsigned long size, va_list *aptr );
00239 Gan_SquMatrix *gan_symmat_insert_gen ( Gan_SquMatrix *S,
00240 unsigned long rS, unsigned long cS,
00241 const struct Gan_Matrix *B,
00242 Gan_TposeFlag B_tr,
00243 unsigned long rB, unsigned long cB,
00244 unsigned long rows,
00245 unsigned long cols );
00246 Gan_SquMatrix *gan_symmat_insertv_gen ( Gan_SquMatrix *A,
00247 unsigned long rA, unsigned long cA,
00248 const struct Gan_Vector *x,
00249 Gan_TposeFlag x_tr,
00250 unsigned long rx, unsigned long size );
00251
00264 #ifdef __cplusplus
00265 }
00266 #endif
00267
00268 #endif