00001 #ifndef SINFO_SOLVE_POLY_ROOT_H
00002 #define SINFO_SOLVE_POLY_ROOT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <stdlib.h>
00026 #include <math.h>
00027 #include <stdlib.h>
00028 #include <cpl.h>
00029 #include "sinfo_msg.h"
00030
00031
00032 #define MAT(m,i,j,n) ((m)[(i)*(n) + (j)])
00033
00034
00035 #define FMAT(m,i,j,n) ((m)[((i)-1)*(n) + ((j)-1)])
00036
00037
00038 #undef __BEGIN_DECLS
00039 #undef __END_DECLS
00040 #ifdef __cplusplus
00041 # define __BEGIN_DECLS extern "C" {
00042 # define __END_DECLS }
00043 #else
00044 # define __BEGIN_DECLS
00045 # define __END_DECLS
00046 #endif
00047
00048 typedef double * gsl_complex_packed_ptr ;
00049
00050 void sinfo_balance_companion_matrix (double *m, size_t nc);
00051 int sinfo_qr_companion (double *h, size_t nc, gsl_complex_packed_ptr z);
00052 void sinfo_set_companion_matrix (const double *a, size_t n, double *m);
00053
00054 __BEGIN_DECLS
00055
00056
00057
00058 typedef struct
00059 {
00060 size_t nc ;
00061 double * sinfo_matrix ;
00062 }
00063 gsl_poly_complex_workspace ;
00064
00065 gsl_poly_complex_workspace * sinfo_gsl_poly_complex_workspace_alloc (size_t n);
00066 void sinfo_gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * w);
00067
00068 int
00069 sinfo_gsl_poly_complex_solve (const double * a, size_t n,
00070 gsl_poly_complex_workspace * w,
00071 gsl_complex_packed_ptr z);
00072
00073
00074
00075 __END_DECLS
00076
00077 #endif