00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MATF_SQUARE_H
00030 #define _GAN_MATF_SQUARE_H
00031
00032 #include <stdlib.h>
00033 #include <stdio.h>
00034 #include <stdarg.h>
00035 #include <gandalf/common/misc_defs.h>
00036 #include <gandalf/linalg/linalg_defs.h>
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00057
00058 struct Gan_SquMatrix_f;
00059
00061 typedef struct Gan_SquMatrixFFuncs
00062 {
00063 Gan_Bool (*set_el) ( struct Gan_SquMatrix_f *A, unsigned i, unsigned j,
00064 float value );
00065 float (*get_el) ( const struct Gan_SquMatrix_f *A, unsigned i, unsigned j );
00066 Gan_Bool (*inc_el) ( struct Gan_SquMatrix_f *A, unsigned i, unsigned j,
00067 float value );
00068 Gan_Bool (*dec_el) ( struct Gan_SquMatrix_f *A, unsigned i, unsigned j,
00069 float value );
00070 Gan_Bool (*fprint) ( FILE *fp, const struct Gan_SquMatrix_f *A,
00071 const char *prefix, unsigned indent, const char *fmt );
00072 struct Gan_SquMatrix_f *(*copy) ( const struct Gan_SquMatrix_f *A,
00073 struct Gan_SquMatrix_f *B );
00074 struct Gan_SquMatrix_f *(*scale) ( struct Gan_SquMatrix_f *A, float a,
00075 struct Gan_SquMatrix_f *B );
00076 struct Gan_SquMatrix_f *(*add) (
00077 struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr,
00078 struct Gan_SquMatrix_f *B, Gan_TposeFlag B_tr,
00079 struct Gan_SquMatrix_f *C );
00080 struct Gan_SquMatrix_f *(*sub) (
00081 struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr,
00082 struct Gan_SquMatrix_f *B, Gan_TposeFlag B_tr,
00083 struct Gan_SquMatrix_f *C );
00084 struct Gan_Vector_f *(*multv) (
00085 const struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr, Gan_InvertFlag A_inv,
00086 struct Gan_Vector_f *x, struct Gan_Vector_f *y );
00087 struct Gan_Matrix_f *(*rmult) (
00088 const struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr, Gan_InvertFlag A_inv,
00089 struct Gan_Matrix_f *B, Gan_TposeFlag B_tr, struct Gan_Matrix_f *C );
00090 struct Gan_Matrix_f *(*lmult) (
00091 const struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr, Gan_InvertFlag A_inv,
00092 struct Gan_Matrix_f *B, Gan_TposeFlag B_tr, struct Gan_Matrix_f *C );
00093 struct Gan_SquMatrix_f *(*rmult_squ) (
00094 struct Gan_SquMatrix_f *A, Gan_TposeFlag A_tr, Gan_InvertFlag A_inv,
00095 struct Gan_SquMatrix_f *B, Gan_TposeFlag B_tr, Gan_InvertFlag B_inv,
00096 struct Gan_SquMatrix_f *C );
00097 struct Gan_SquMatrix_f *(*lrmult) (
00098 const struct Gan_SquMatrix_f *A, const struct Gan_Matrix_f *B, Gan_TposeFlag B_tr,
00099 struct Gan_Matrix_f *C, struct Gan_SquMatrix_f *D );
00100 struct Gan_SquMatrix_f *(*invert) ( struct Gan_SquMatrix_f *A,
00101 struct Gan_SquMatrix_f *B );
00102 struct Gan_SquMatrix_f *(*cholesky) ( struct Gan_SquMatrix_f *S,
00103 struct Gan_SquMatrix_f *L,
00104 int *error_code );
00105 float (*sumsqr) ( const struct Gan_SquMatrix_f *A );
00106 float (*Fnorm) ( const struct Gan_SquMatrix_f *A );
00107 struct Gan_Matrix_f *(*matrix) ( const struct Gan_SquMatrix_f *A,
00108 struct Gan_Matrix_f *B );
00109 } Gan_SquMatrixFFuncs;
00110
00112 typedef struct Gan_SquMatrix_f
00113 {
00114
00115 Gan_SquMatrixType type;
00116
00117
00118 unsigned long size;
00119
00120
00121 float *data;
00122
00123
00124 size_t data_size;
00125
00126
00127 Gan_SquMatrixFFuncs *funcs;
00128
00129
00130 Gan_Bool data_alloc;
00131
00132
00133 Gan_Bool struct_alloc;
00134 } Gan_SquMatrix_f;
00135
00136 #define GAN_SQUMATRIXF_STRUCT_DEFINED
00137
00138 #include <gandalf/linalg/vecf_gen.h>
00139 #include <gandalf/linalg/matf_gen.h>
00140
00154 Gan_SquMatrix_f *gan_squmatf_alloc ( Gan_SquMatrixType type,
00155 unsigned long size );
00156
00168 Gan_SquMatrix_f *gan_squmatf_form ( Gan_SquMatrix_f *A, Gan_SquMatrixType type,
00169 unsigned long size );
00170
00183 Gan_SquMatrix_f *
00184 gan_squmatf_form_data ( Gan_SquMatrix_f *A,
00185 Gan_SquMatrixType type, unsigned long size,
00186 float *data, size_t data_size );
00187
00203 Gan_Bool gan_squmatf_set_el ( Gan_SquMatrix_f *A, unsigned row, unsigned col,
00204 float value );
00205
00212 float gan_squmatf_get_el ( const Gan_SquMatrix_f *A, unsigned row, unsigned col );
00213
00220 Gan_Bool gan_squmatf_inc_el ( Gan_SquMatrix_f *A, unsigned row, unsigned col,
00221 float value );
00222
00229 Gan_Bool gan_squmatf_dec_el ( Gan_SquMatrix_f *A, unsigned row, unsigned col,
00230 float value );
00231
00248 Gan_Bool gan_squmatf_fprint ( FILE *fp, const Gan_SquMatrix_f *A,
00249 const char *prefix, int indent,
00250 const char *fmt );
00251
00259 Gan_Bool gan_squmatf_print ( const Gan_SquMatrix_f *A,
00260 const char *prefix, int indent, const char *fmt );
00261
00283 Gan_SquMatrix_f *
00284 gan_squmatf_fill_const_s ( Gan_SquMatrixType type,
00285 unsigned long size, float value );
00286
00299 Gan_SquMatrix_f *
00300 gan_squmatf_fill_zero_q ( Gan_SquMatrix_f *A, Gan_SquMatrixType type,
00301 unsigned long size );
00302
00314 Gan_SquMatrix_f *
00315 gan_squmatf_fill_zero_s ( Gan_SquMatrixType type, unsigned long size );
00316
00331 Gan_SquMatrix_f *gan_squmatf_copy_q ( const Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00332
00338 Gan_SquMatrix_f *gan_squmatf_copy_s ( const Gan_SquMatrix_f *A );
00339
00356 Gan_SquMatrix_f *gan_squmatf_scale_q ( Gan_SquMatrix_f *A, float a,
00357 Gan_SquMatrix_f *B );
00358
00366 Gan_SquMatrix_f *gan_squmatf_scale_s ( Gan_SquMatrix_f *A, float a );
00367
00375 Gan_SquMatrix_f *gan_squmatf_scale_i ( Gan_SquMatrix_f *A, float a );
00376
00384 Gan_SquMatrix_f *gan_squmatf_divide_q ( Gan_SquMatrix_f *A, float a,
00385 Gan_SquMatrix_f *B );
00386
00394 Gan_SquMatrix_f *gan_squmatf_divide_s ( Gan_SquMatrix_f *A, float a );
00395
00402 Gan_SquMatrix_f *gan_squmatf_divide_i ( Gan_SquMatrix_f *A, float a );
00403
00410 Gan_SquMatrix_f *gan_squmatf_negate_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00411
00418 Gan_SquMatrix_f *gan_squmatf_negate_s ( Gan_SquMatrix_f *A );
00419
00425 Gan_SquMatrix_f *gan_squmatf_negate_i ( Gan_SquMatrix_f *A );
00426
00443 Gan_SquMatrix_f *gan_squmatf_add_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B,
00444 Gan_SquMatrix_f *C );
00445
00453 Gan_SquMatrix_f *gan_squmatf_add_s ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00454
00462 Gan_SquMatrix_f *gan_squmatf_add_i1 ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00463
00471 Gan_SquMatrix_f *gan_squmatf_add_i2 ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00472
00480 Gan_SquMatrix_f *gan_squmatf_increment ( Gan_SquMatrix_f *A,
00481 Gan_SquMatrix_f *B );
00482
00490 Gan_SquMatrix_f *gan_squmatf_addT_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B,
00491 Gan_SquMatrix_f *C );
00492
00500 Gan_SquMatrix_f *gan_squmatf_addT_s ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00501
00509 Gan_SquMatrix_f *gan_squmatf_incrementT ( Gan_SquMatrix_f *A,
00510 Gan_SquMatrix_f *B );
00511
00528 Gan_SquMatrix_f *gan_squmatf_sub_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B,
00529 Gan_SquMatrix_f *C );
00530
00538 Gan_SquMatrix_f *gan_squmatf_sub_s ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00539
00547 Gan_SquMatrix_f *gan_squmatf_sub_i1 ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00548
00556 Gan_SquMatrix_f *gan_squmatf_sub_i2 ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00557
00564 Gan_SquMatrix_f *gan_squmatf_decrement ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
00565
00573 Gan_SquMatrix_f *gan_squmatf_subT_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B,
00574 Gan_SquMatrix_f *C );
00575
00583 Gan_SquMatrix_f *gan_squmatf_subT_s ( Gan_SquMatrix_f *A,
00584 Gan_SquMatrix_f *B );
00585
00593 Gan_SquMatrix_f *gan_squmatf_decrementT ( Gan_SquMatrix_f *A,
00594 Gan_SquMatrix_f *B );
00595
00612 Gan_Vector_f *gan_squmatf_multv_q ( const Gan_SquMatrix_f *A, Gan_Vector_f *x,
00613 Gan_Vector_f *y );
00614
00622 Gan_Vector_f *gan_squmatf_multv_s ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00623
00631 Gan_Vector_f *gan_squmatf_multv_i ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00632
00640 Gan_Vector_f *gan_squmatTf_multv_q ( const Gan_SquMatrix_f *A, Gan_Vector_f *x,
00641 Gan_Vector_f *y );
00642
00649 Gan_Vector_f *gan_squmatTf_multv_s ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00650
00658 Gan_Vector_f *gan_squmatTf_multv_i ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00659
00667 Gan_Vector_f *gan_squmatIf_multv_q ( const Gan_SquMatrix_f *A, Gan_Vector_f *x,
00668 Gan_Vector_f *y );
00669
00677 Gan_Vector_f *gan_squmatIf_multv_s ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00678
00686 Gan_Vector_f *gan_squmatIf_multv_i ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00687
00695 Gan_Vector_f *gan_squmatITf_multv_q ( const Gan_SquMatrix_f *A, Gan_Vector_f *x,
00696 Gan_Vector_f *y );
00697
00705 Gan_Vector_f *gan_squmatITf_multv_s ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00706
00714 Gan_Vector_f *gan_squmatITf_multv_i ( const Gan_SquMatrix_f *A, Gan_Vector_f *x );
00715
00732 Gan_Matrix_f *gan_squmatf_rmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00733 Gan_Matrix_f *C );
00734
00742 Gan_Matrix_f *gan_squmatf_rmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00743
00751 Gan_Matrix_f *gan_squmatf_rmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00752
00760 Gan_Matrix_f *gan_squmatf_rmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00761 Gan_Matrix_f *C );
00762
00770 Gan_Matrix_f *gan_squmatf_rmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00771
00779 Gan_Matrix_f *gan_squmatTf_rmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00780 Gan_Matrix_f *C );
00781
00789 Gan_Matrix_f *gan_squmatTf_rmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00790
00798 Gan_Matrix_f *gan_squmatTf_rmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00799
00807 Gan_Matrix_f *gan_squmatTf_rmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00808 Gan_Matrix_f *C );
00809
00817 Gan_Matrix_f *gan_squmatTf_rmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00818
00826 Gan_Matrix_f *gan_squmatIf_rmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00827 Gan_Matrix_f *C );
00828
00836 Gan_Matrix_f *gan_squmatIf_rmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00837
00845 Gan_Matrix_f *gan_squmatIf_rmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00846
00854 Gan_Matrix_f *gan_squmatIf_rmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00855 Gan_Matrix_f *C );
00856
00864 Gan_Matrix_f *gan_squmatIf_rmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00865
00873 Gan_Matrix_f *gan_squmatITf_rmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00874 Gan_Matrix_f *C );
00875
00883 Gan_Matrix_f *gan_squmatITf_rmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00884
00892 Gan_Matrix_f *gan_squmatITf_rmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00893
00901 Gan_Matrix_f *gan_squmatITf_rmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00902 Gan_Matrix_f *C );
00903
00912 Gan_Matrix_f *gan_squmatITf_rmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00913
00921 Gan_Matrix_f *gan_squmatf_lmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00922 Gan_Matrix_f *C );
00923
00931 Gan_Matrix_f *gan_squmatf_lmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00932
00940 Gan_Matrix_f *gan_squmatf_lmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00941
00949 Gan_Matrix_f *gan_squmatf_lmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00950 Gan_Matrix_f *C );
00951
00959 Gan_Matrix_f *gan_squmatf_lmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00960
00968 Gan_Matrix_f *gan_squmatTf_lmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00969 Gan_Matrix_f *C );
00970
00978 Gan_Matrix_f *gan_squmatTf_lmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00979
00987 Gan_Matrix_f *gan_squmatTf_lmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
00988
00996 Gan_Matrix_f *gan_squmatTf_lmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
00997 Gan_Matrix_f *C );
00998
01007 Gan_Matrix_f *gan_squmatTf_lmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01008
01016 Gan_Matrix_f *gan_squmatIf_lmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
01017 Gan_Matrix_f *C );
01018
01026 Gan_Matrix_f *gan_squmatIf_lmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01027
01035 Gan_Matrix_f *gan_squmatIf_lmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01036
01044 Gan_Matrix_f *gan_squmatIf_lmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
01045 Gan_Matrix_f *C );
01046
01054 Gan_Matrix_f *gan_squmatIf_lmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01055
01063 Gan_Matrix_f *gan_squmatITf_lmult_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
01064 Gan_Matrix_f *C );
01065
01073 Gan_Matrix_f *gan_squmatITf_lmult_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01074
01082 Gan_Matrix_f *gan_squmatITf_lmult_i ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01083
01092 Gan_Matrix_f *gan_squmatITf_lmultT_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B,
01093 Gan_Matrix_f *C );
01094
01103 Gan_Matrix_f *gan_squmatITf_lmultT_s ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01104
01112 Gan_SquMatrix_f *gan_squmatf_srmultT_squ_q ( Gan_SquMatrix_f *A,
01113 Gan_SquMatrix_f *B );
01114
01122 Gan_SquMatrix_f *gan_squmatf_srmultT_squ_s ( Gan_SquMatrix_f *A );
01123
01131 Gan_SquMatrix_f *gan_squmatf_srmultT_squ_i ( Gan_SquMatrix_f *A );
01132
01140 Gan_SquMatrix_f *gan_squmatTf_srmult_squ_q ( Gan_SquMatrix_f *A,
01141 Gan_SquMatrix_f *B );
01142
01150 Gan_SquMatrix_f *gan_squmatTf_srmult_squ_s ( Gan_SquMatrix_f *A );
01151
01159 Gan_SquMatrix_f *gan_squmatTf_srmult_squ_i ( Gan_SquMatrix_f *A );
01160
01168 Gan_SquMatrix_f *gan_squmatIf_srmultIT_squ_q ( Gan_SquMatrix_f *A,
01169 Gan_SquMatrix_f *B );
01170
01178 Gan_SquMatrix_f *gan_squmatIf_srmultIT_squ_s ( Gan_SquMatrix_f *A );
01179
01187 Gan_SquMatrix_f *gan_squmatIf_srmultIT_squ_i ( Gan_SquMatrix_f *A );
01188
01196 Gan_SquMatrix_f *gan_squmatITf_srmultI_squ_q ( Gan_SquMatrix_f *A,
01197 Gan_SquMatrix_f *B );
01198
01206 Gan_SquMatrix_f *gan_squmatITf_srmultI_squ_s ( Gan_SquMatrix_f *A );
01207
01215 Gan_SquMatrix_f *gan_squmatITf_srmultI_squ_i ( Gan_SquMatrix_f *A );
01216
01236 Gan_SquMatrix_f *gan_symmatf_lrmult_q ( Gan_SquMatrix_f *A, const Gan_Matrix_f *B,
01237 const Gan_Matrix_f *C, Gan_SquMatrix_f *D );
01238
01249 Gan_SquMatrix_f *gan_symmatf_lrmult_s ( Gan_SquMatrix_f *A, const Gan_Matrix_f *B,
01250 const Gan_Matrix_f *C );
01251
01262 Gan_SquMatrix_f *gan_symmatf_lrmultT_q ( Gan_SquMatrix_f *A, const Gan_Matrix_f *B,
01263 const Gan_Matrix_f *C, Gan_SquMatrix_f *D );
01264
01275 Gan_SquMatrix_f *gan_symmatf_lrmultT_s ( Gan_SquMatrix_f *A, const Gan_Matrix_f *B,
01276 const Gan_Matrix_f *C );
01277
01294 Gan_SquMatrix_f *gan_squmatf_invert_q ( Gan_SquMatrix_f *A, Gan_SquMatrix_f *B );
01295
01303 Gan_SquMatrix_f *gan_squmatf_invert_s ( Gan_SquMatrix_f *A );
01304
01312 Gan_SquMatrix_f *gan_squmatf_invert_i ( Gan_SquMatrix_f *A );
01313
01330 Gan_SquMatrix_f *gan_squmatf_cholesky_q ( Gan_SquMatrix_f *A,
01331 Gan_SquMatrix_f *L );
01332
01341 Gan_SquMatrix_f *gan_squmatf_cholesky_s ( Gan_SquMatrix_f *A );
01342
01350 Gan_SquMatrix_f *gan_squmatf_cholesky_i ( Gan_SquMatrix_f *A );
01351
01367 float gan_squmatf_sumsqr ( Gan_SquMatrix_f *A );
01368
01374 float gan_squmatf_Fnorm ( Gan_SquMatrix_f *A );
01375
01393 Gan_Matrix_f *gan_matf_from_squmatf_q ( const Gan_SquMatrix_f *A, Gan_Matrix_f *B );
01394
01403 Gan_Matrix_f *gan_matf_from_squmatf_s ( const Gan_SquMatrix_f *A );
01404
01420 Gan_Bool gan_squmatf_same_type ( const Gan_SquMatrix_f *A, const Gan_SquMatrix_f *B );
01421
01428 Gan_Bool gan_squmatf_same_size ( const Gan_SquMatrix_f *A, const Gan_SquMatrix_f *B );
01429
01436 Gan_Bool gan_squmatf_same_type_size ( const Gan_SquMatrix_f *A, const Gan_SquMatrix_f *B );
01437
01455 Gan_SquMatrix_f *gan_squmatf_set_type ( Gan_SquMatrix_f *A,
01456 Gan_SquMatrixType type );
01457
01466 Gan_SquMatrix_f *gan_squmatf_set_size ( Gan_SquMatrix_f *A,
01467 unsigned long size );
01468
01484 Gan_Bool gan_squmatf_test_size ( const Gan_Matrix_f *A, unsigned long size );
01485
01492 Gan_Bool gan_squmatf_symmetric_type ( const Gan_SquMatrix_f *A );
01493
01500 Gan_Bool gan_squmatf_diagonal_type ( const Gan_SquMatrix_f *A );
01501
01510 Gan_Bool gan_squmatf_symmetric ( const Gan_SquMatrix_f *A );
01511
01520 Gan_Bool gan_squmatf_diagonal ( const Gan_SquMatrix_f *A );
01521
01543 Gan_SquMatrix_f *gan_squmatf_fscanf_s ( FILE *fp,
01544 const char *prefix, int prefix_len );
01545
01554 Gan_SquMatrix_f *gan_squmatf_fread_s ( FILE *fp, gan_uint32 *magic_number );
01555
01560 void gan_squmatf_free ( Gan_SquMatrix_f *A );
01561 void gan_squmatf_free_va ( Gan_SquMatrix_f *A, ... );
01562 Gan_SquMatrix_f *gan_squmatf_set_type_size ( Gan_SquMatrix_f *A,
01563 Gan_SquMatrixType type,
01564 unsigned long size );
01565 Gan_SquMatrix_f *gan_squmatf_fill_vap ( Gan_SquMatrix_f *A,
01566 Gan_SquMatrixType type,
01567 unsigned long size, va_list *aptr );
01568 Gan_SquMatrix_f *gan_squmatf_fill_const_q ( Gan_SquMatrix_f *A,
01569 Gan_SquMatrixType type,
01570 unsigned long size, float value );
01571 size_t gan_squmatf_data_size ( Gan_SquMatrixType type, unsigned long size );
01572 Gan_SquMatrix_f *gan_squmatf_fscanf_q ( FILE *fp, Gan_SquMatrix_f *A,
01573 char *prefix, int prefix_len );
01574 Gan_Bool gan_squmatf_fwrite ( FILE *fp, const Gan_SquMatrix_f *A,
01575 gan_uint32 magic_number );
01576 Gan_SquMatrix_f *gan_squmatf_fread_q ( FILE *fp, Gan_SquMatrix_f *A,
01577 gan_uint32 *magic_number );
01578
01579
01580 Gan_SquMatrix_f *gan_squmatf_form_gen ( Gan_SquMatrix_f *A,
01581 Gan_SquMatrixType type,
01582 unsigned long size,
01583 float *data, size_t data_size );
01584 void gan_squmatf_free_func ( Gan_SquMatrix_f *A );
01585 #ifndef NDEBUG
01586 void gan_squmatf_db ( const Gan_SquMatrix_f *A );
01587 #endif
01588
01601 #ifdef __cplusplus
01602 }
01603 #endif
01604
01605 #endif