sinfo_solve_poly_root.h

00001 #ifndef SINFO_SOLVE_POLY_ROOT_H
00002 #define SINFO_SOLVE_POLY_ROOT_H
00003 /*
00004  * This file is part of the ESO SINFONI Pipeline
00005  * Copyright (C) 2004,2005 European Southern Observatory
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00020  */
00021 
00022 /*
00023 #include <stdio.h>
00024 */
00025 #include <stdlib.h>
00026 #include <math.h>
00027 #include <stdlib.h>
00028 #include <cpl.h>
00029 #include "sinfo_msg.h"
00030 /*
00031 #include "eclipse.h"
00032 */
00033 
00034 /* C-style sinfo_matrix elements */
00035 #define MAT(m,i,j,n) ((m)[(i)*(n) + (j)])
00036 
00037 /* Fortran-style sinfo_matrix elements */
00038 #define FMAT(m,i,j,n) ((m)[((i)-1)*(n) + ((j)-1)])
00039 
00040 
00041 #undef __BEGIN_DECLS
00042 #undef __END_DECLS
00043 #ifdef __cplusplus
00044 # define __BEGIN_DECLS extern "C" {
00045 # define __END_DECLS }
00046 #else
00047 # define __BEGIN_DECLS /* empty */
00048 # define __END_DECLS /* empty */
00049 #endif
00050 
00051 typedef double *       gsl_complex_packed_ptr ;
00052 
00053 void sinfo_balance_companion_matrix (double *m, size_t nc);
00054 int sinfo_qr_companion (double *h, size_t nc, gsl_complex_packed_ptr z);
00055 void sinfo_set_companion_matrix (const double *a, size_t n, double *m);
00056 
00057 __BEGIN_DECLS
00058 
00059 /* Solve for the complex roots of a general real polynomial */
00060 
00061 typedef struct 
00062 { 
00063   size_t nc ;
00064   double * sinfo_matrix ; 
00065 } 
00066 gsl_poly_complex_workspace ;
00067 
00068 gsl_poly_complex_workspace * sinfo_gsl_poly_complex_workspace_alloc (size_t n);
00069 void sinfo_gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * w);
00070 
00071 int
00072 sinfo_gsl_poly_complex_solve (const double * a, size_t n, 
00073                         gsl_poly_complex_workspace * w,
00074                         gsl_complex_packed_ptr z);
00075             
00076             
00077 
00078 __END_DECLS
00079 
00080 #endif /* SINFO_SOLVE_POLY_ROOT_H */

Generated on Wed Jan 17 08:33:44 2007 for SINFONI Pipeline Reference Manual by  doxygen 1.4.4