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
00033
00034
00035 #define MAT(m,i,j,n) ((m)[(i)*(n) + (j)])
00036
00037
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
00048 # define __END_DECLS
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
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