1 #ifndef SINFO_SOLVE_POLY_ROOT_H
2 #define SINFO_SOLVE_POLY_ROOT_H
29 #include "sinfo_msg.h"
32 #define MAT(m,i,j,n) ((m)[(i)*(n) + (j)])
35 #define FMAT(m,i,j,n) ((m)[((i)-1)*(n) + ((j)-1)])
41 # define __BEGIN_DECLS extern "C" {
42 # define __END_DECLS }
44 # define __BEGIN_DECLS
48 typedef double * gsl_complex_packed_ptr ;
50 void sinfo_balance_companion_matrix (
double *m,
size_t nc);
51 int sinfo_qr_companion (
double *h,
size_t nc, gsl_complex_packed_ptr z);
52 void sinfo_set_companion_matrix (
const double *a,
size_t n,
double *m);
61 double * sinfo_matrix ;
63 gsl_poly_complex_workspace ;
65 gsl_poly_complex_workspace * sinfo_gsl_poly_complex_workspace_alloc (
size_t n);
66 void sinfo_gsl_poly_complex_workspace_free (gsl_poly_complex_workspace * w);
69 sinfo_gsl_poly_complex_solve (
const double * a,
size_t n,
70 gsl_poly_complex_workspace * w,
71 gsl_complex_packed_ptr z);