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_SYMMAT_EIGEN_H 00030 #define _GAN_SYMMAT_EIGEN_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 00061 typedef struct 00062 { 00063 Gan_SquMatrix SxxT; 00064 Gan_SquMatrix W; 00065 Gan_Matrix Z; 00066 Gan_Vector work; 00068 Gan_Bool alloc; 00069 } Gan_SymMatEigenStruct; 00070 00071 Gan_SymMatEigenStruct *gan_symeigen_form_data ( Gan_SymMatEigenStruct *sme, 00072 long max_size, 00073 double *work_data, 00074 unsigned long work_data_size ); 00075 00089 Gan_SymMatEigenStruct *gan_symeigen_form ( Gan_SymMatEigenStruct *sme, 00090 long max_size ); 00091 00104 Gan_SymMatEigenStruct *gan_symeigen_alloc ( long max_size ); 00105 00106 void gan_symeigen_free ( Gan_SymMatEigenStruct *sme ); 00107 Gan_Bool gan_symeigen_reset ( Gan_SymMatEigenStruct *sme, long size ); 00108 Gan_Bool gan_symeigen_increment ( Gan_SymMatEigenStruct *sme, 00109 double scale, ... ); 00110 Gan_Bool gan_symeigen_solve ( Gan_SymMatEigenStruct *sme ); 00111 00124 #ifdef __cplusplus 00125 } 00126 #endif 00127 00128 #endif /* #ifndef _GAN_SYMMAT_EIGEN_H */