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

pseudo_inversef.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_PSEUDO_INVERSEF_H
00030 #define _GAN_PSEUDO_INVERSEF_H
00031 
00032 #include <gandalf/linalg/vecf_gen.h>
00033 #include <gandalf/linalg/matf_gen.h>
00034 #include <gandalf/linalg/matf_square.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00060 
00061 
00062 typedef struct
00063 {
00064    Gan_SquMatrix_f SaaT; 
00065    Gan_Matrix_f    SabT; 
00068    Gan_SquMatrix_f L; 
00069    Gan_Matrix_f    X; 
00071 
00072    Gan_Bool solved;
00073 
00075    Gan_Vector_f a, b;
00076 
00078    Gan_Matrix_f *C, *D;
00079 
00081    int null_space;
00082 
00084    float ratio_thres;
00085 
00087    int low_values_allowed;
00088 
00090    Gan_Matrix_f *U;
00091 
00093    Gan_Vector_f *null_vector;
00094 
00096    Gan_Bool alloc;
00097 } Gan_PseudoInverseStruct_f;
00098 
00099 Gan_PseudoInverseStruct_f *gan_pseudoinvf_form (Gan_PseudoInverseStruct_f *psi,
00100                                                 long max_asize,
00101                                                 long max_bsize);
00102 
00116 Gan_PseudoInverseStruct_f *gan_pseudoinvf_alloc ( long max_asize,
00117                                                   long max_bsize );
00118 
00119 void     gan_pseudoinvf_free ( Gan_PseudoInverseStruct_f *pis );
00120 Gan_Bool gan_pseudoinvf_reset ( Gan_PseudoInverseStruct_f *pis,
00121                                 long asize, long bsize );
00122 Gan_Bool gan_pseudoinvf_increment ( Gan_PseudoInverseStruct_f *pis,
00123                                     float scale, ... );
00124 Gan_Bool gan_pseudoinvf_decrement ( Gan_PseudoInverseStruct_f *pis,
00125                                     float scale, ... );
00126 Gan_Bool gan_pseudoinvf_set_constraint ( Gan_PseudoInverseStruct_f *pis,
00127                                          Gan_Matrix_f *C, Gan_Matrix_f *D );
00128 Gan_Bool gan_pseudoinvf_set_null_space ( Gan_PseudoInverseStruct_f *pis,
00129                                          int null_space );
00130 Gan_Bool gan_pseudoinvf_set_ratio_thres ( Gan_PseudoInverseStruct_f *pis,
00131                                           float ratio_thres );
00132 Gan_Bool gan_pseudoinvf_set_low_values_allowed (Gan_PseudoInverseStruct_f *pis,
00133                                                 int low_values_allowed );
00134 Gan_Bool gan_pseudoinvf_solve ( Gan_PseudoInverseStruct_f *pis,
00135                                 int *error_code );
00136 Gan_Matrix_f *gan_pseudoinvf_get_solution ( Gan_PseudoInverseStruct_f *pis );
00137 Gan_Vector_f *gan_pseudoinvf_get_null_vector ( Gan_PseudoInverseStruct_f *pis);
00138 
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 
00160 #endif /* #ifndef _GAN_PSEUDO_INVERSEF_H */

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