liba2ri  0.2
 All Data Structures
matrix.h
1 /*************************************/
2 /* Auteur : Rémi Synave */
3 /* Date de création : 01/03/07 */
4 /* Date de modification : 08/01/10 */
5 /* Version : 0.2 */
6 /*************************************/
7 
8 /***************************************************************************/
9 /* This file is part of a2ri. */
10 /* */
11 /* a2ri is free software: you can redistribute it and/or modify it */
12 /* under the terms of the GNU Lesser General Public License as published */
13 /* by the Free Software Foundation, either version 3 of the License, or */
14 /* (at your option) any later version. */
15 /* */
16 /* a2ri is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19 /* GNU Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public */
22 /* License along with a2ri. */
23 /* If not, see <http://www.gnu.org/licenses/>. */
24 /***************************************************************************/
25 
26 
27 
28 #ifndef MATRIX__H
29 #define MATRIX__H
30 
31 #include "util.h"
32 #include "point.h"
33 #include <math.h>
34 #include <gsl/gsl_linalg.h>
35 #include <gsl/gsl_math.h>
36 #include <gsl/gsl_blas.h>
37 
43 double matrix_determinant (
44  gsl_matrix * m);
45 
51 double matrix_frobenius_norm (
52  gsl_matrix * m);
53 
60 gsl_matrix *matrix_add (
61  gsl_matrix * A,
62  gsl_matrix * B);
63 
70 gsl_matrix *matrix_sub (
71  gsl_matrix * A,
72  gsl_matrix * B);
73 
80 gsl_matrix *matrix_mul_scale (
81  gsl_matrix * A,
82  double n);
83 
91 gsl_matrix *matrix_mul (
92  gsl_matrix * A,
93  gsl_matrix * B);
94 
100 gsl_matrix *matrix_inverse (
101  gsl_matrix * m);
102 
108 void matrix_display (
109  gsl_matrix * m);
110 
129 gsl_matrix *matrix_init (
130  double *data,
131  int nbline,
132  int nbcol);
133 
139 gsl_matrix *matrix_transpose (
140  gsl_matrix * m);
141 
149 gsl_matrix *cross_variance (
150  point3d * data_p,
151  point3d * data_x,
152  int nbpoint);
153 
154 
155 #endif