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

pseudo_inverse.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_INVERSE_H
00030 #define _GAN_PSEUDO_INVERSE_H
00031 
00032 #include <gandalf/linalg/vec_gen.h>
00033 #include <gandalf/linalg/mat_gen.h>
00034 #include <gandalf/linalg/mat_square.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00060 
00061 
00062 typedef struct
00063 {
00064    Gan_SquMatrix SaaT; 
00065    Gan_Matrix    SabT; 
00068    Gan_SquMatrix L; 
00069    Gan_Matrix    X; 
00071 
00072    Gan_Bool solved;
00073 
00075    Gan_Vector a, b;
00076 
00078    Gan_Matrix *C, *D;
00079 
00081    int null_space;
00082 
00084    double ratio_thres;
00085 
00087    int low_values_allowed;
00088 
00090    Gan_Matrix *U;
00091 
00093    Gan_Vector *null_vector;
00094 
00096    Gan_Bool alloc;
00097 } Gan_PseudoInverseStruct;
00098 
00099  Gan_PseudoInverseStruct *gan_pseudoinv_form ( Gan_PseudoInverseStruct *psi,
00100                                               long max_asize,
00101                                               long max_bsize );
00102 
00116  Gan_PseudoInverseStruct *gan_pseudoinv_alloc ( long max_asize,
00117                                                long max_bsize );
00118 
00119  void     gan_pseudoinv_free ( Gan_PseudoInverseStruct *pis );
00120  Gan_Bool gan_pseudoinv_reset ( Gan_PseudoInverseStruct *pis,
00121                                long asize, long bsize );
00122  Gan_Bool gan_pseudoinv_increment ( Gan_PseudoInverseStruct *pis,
00123                                    double scale, ... );
00124  Gan_Bool gan_pseudoinv_decrement ( Gan_PseudoInverseStruct *pis,
00125                                    double scale, ... );
00126  Gan_Bool gan_pseudoinv_set_constraint ( Gan_PseudoInverseStruct *pis,
00127                                         Gan_Matrix *C, Gan_Matrix *D );
00128  Gan_Bool gan_pseudoinv_set_null_space ( Gan_PseudoInverseStruct *pis,
00129                                         int null_space );
00130  Gan_Bool gan_pseudoinv_set_ratio_thres ( Gan_PseudoInverseStruct *pis,
00131                                          double ratio_thres );
00132  Gan_Bool gan_pseudoinv_set_low_values_allowed ( Gan_PseudoInverseStruct *pis,
00133                                                 int low_values_allowed );
00134  Gan_Bool gan_pseudoinv_solve ( Gan_PseudoInverseStruct *pis, int *error_code );
00135  Gan_Matrix *
00136          gan_pseudoinv_get_solution ( Gan_PseudoInverseStruct *pis );
00137  Gan_Vector *
00138          gan_pseudoinv_get_null_vector ( Gan_PseudoInverseStruct *pis );
00139 
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 
00160 #endif /* #ifndef _GAN_PSEUDO_INVERSE_H */

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