gpc_utils.h
Go to the documentation of this file.
1 #ifndef H_GPC_UTILS
2 #define H_GPC_UTILS
3 
4 #include <gsl/gsl_matrix.h>
5 #include <gsl/gsl_blas.h>
6 #include <gsl/gsl_linalg.h>
7 #include <gsl/gsl_poly.h>
8 
9 /* The GSL is a pain to work with. The library DOES NOT HAVE a determinant() function
10  or an inv() function: you have to write your own routines. */
11 
12 #define gmg gsl_matrix_get
13 #define gms gsl_matrix_set
14 
15 void m_trans(const gsl_matrix*A, gsl_matrix*A_t);
16 void m_mult(const gsl_matrix*A, const gsl_matrix*B, gsl_matrix*AB);
17 void m_add(const gsl_matrix*A, const gsl_matrix*B, gsl_matrix*ApB);
18 void m_add_to(const gsl_matrix*A, gsl_matrix*B);
19 void m_scale(double m, gsl_matrix*A);
20 double m_dot(const gsl_matrix*A,const gsl_matrix*B);
21 void m_inv(const gsl_matrix*A, gsl_matrix*invA);
22 double m_det(const gsl_matrix*A);
23 
24 /* Returns the real part of the roots in roots */
25 int poly_real_roots(unsigned int n, const double*a, double *roots);
26 
27 int poly_greatest_real_root(unsigned int n, const double*a, double *root);
28 
29 void m_display(const char*str, gsl_matrix*m);
30 
31 #endif
void m_trans(const gsl_matrix *A, gsl_matrix *A_t)
Definition: gpc_utils.c:4
void m_add_to(const gsl_matrix *A, gsl_matrix *B)
Definition: gpc_utils.c:12
void m_scale(double m, gsl_matrix *A)
Definition: gpc_utils.c:16
int poly_greatest_real_root(unsigned int n, const double *a, double *root)
Definition: gpc_utils.c:77
double m_dot(const gsl_matrix *A, const gsl_matrix *B)
Definition: gpc_utils.c:53
void m_inv(const gsl_matrix *A, gsl_matrix *invA)
Definition: gpc_utils.c:25
int poly_real_roots(unsigned int n, const double *a, double *roots)
Definition: gpc_utils.c:61
void m_display(const char *str, gsl_matrix *m)
Definition: gpc_utils.c:124
#define m(v1, v2)
Definition: egsl_macros.h:13
void m_add(const gsl_matrix *A, const gsl_matrix *B, gsl_matrix *ApB)
Definition: gpc_utils.c:20
double m_det(const gsl_matrix *A)
Definition: gpc_utils.c:39
void m_mult(const gsl_matrix *A, const gsl_matrix *B, gsl_matrix *AB)
Definition: gpc_utils.c:8


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23