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

matf_square.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* forward declaration of square matrix structure */
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    /* type of square matrix, i.e. symmetric, triangular etc. */
00115    Gan_SquMatrixType type;
00116 
00117    /* row and column sizes of matrix */
00118    unsigned long size;
00119 
00120    /* data array containing matrix elements */
00121    float *data;
00122 
00123    /* allocated size of matrix (number of float's) */
00124    size_t data_size;
00125 
00126    /* pointer to structure containing type-specific functions */
00127    Gan_SquMatrixFFuncs *funcs;
00128 
00129    /* flag indicating whether matrix data was dynamically allocated */
00130    Gan_Bool data_alloc;
00131 
00132    /* flag indicating whether matrix structure was dynamically allocated */
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 /* not user functions */
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 ); /* for use in a debugger */
01587 #endif
01588 
01601 #ifdef __cplusplus
01602 }
01603 #endif
01604 
01605 #endif /* #ifndef _GAN_MATF_SQUARE_H */

Generated on Fri Mar 17 12:44:48 2006 by  doxygen 1.3.9.1