gpc_utils.h
Go to the documentation of this file.
00001 #ifndef H_GPC_UTILS
00002 #define H_GPC_UTILS
00003 
00004 #include <gsl/gsl_matrix.h>
00005 #include <gsl/gsl_blas.h>
00006 #include <gsl/gsl_linalg.h>
00007 #include <gsl/gsl_poly.h>
00008 
00009 /* The GSL is a pain to work with. The library DOES NOT HAVE a determinant() function
00010   or an inv() function: you have to write your own routines. */
00011 
00012 #define gmg gsl_matrix_get
00013 #define gms gsl_matrix_set
00014 
00015 void m_trans(const gsl_matrix*A, gsl_matrix*A_t);
00016 void m_mult(const gsl_matrix*A, const gsl_matrix*B, gsl_matrix*AB);
00017 void m_add(const gsl_matrix*A, const gsl_matrix*B, gsl_matrix*ApB);
00018 void m_add_to(const gsl_matrix*A, gsl_matrix*B);
00019 void m_scale(double m, gsl_matrix*A);
00020 double m_dot(const gsl_matrix*A,const gsl_matrix*B);
00021 void m_inv(const gsl_matrix*A, gsl_matrix*invA);
00022 double m_det(const gsl_matrix*A);
00023 
00024 /* Returns the real part of the roots in roots */
00025 int poly_real_roots(unsigned int n, const double*a, double *roots);
00026 
00027 int poly_greatest_real_root(unsigned int n, const double*a, double *root);
00028 
00029 void m_display(const char*str, gsl_matrix*m);
00030 
00031 #endif


csm
Author(s): Andrea Censi
autogenerated on Fri May 17 2019 02:28:33