1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2010 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
22 #ifndef __HKL_MATRIX_H__
23 #define __HKL_MATRIX_H__
26 #include <hkl/hkl-macros.h>
27 #include <hkl/hkl-vector.h>
37 extern void hkl_matrix_init(HklMatrix
*self
,
38 double m11
, double m12
, double m13
,
39 double m21
, double m22
, double m23
,
40 double m31
, double m32
, double m33
);
42 extern void hkl_matrix_init_from_two_vector(HklMatrix
*self
,
43 const HklVector
*v1
, const HklVector
*v2
);
45 extern void hkl_matrix_init_from_euler(HklMatrix
*self
,
46 double euler_x
, double euler_y
, double euler_z
);
48 extern void hkl_matrix_fprintf(FILE *file
, const HklMatrix
*self
);
50 extern void hkl_matrix_to_euler(const HklMatrix
*self
,
51 double *euler_x
, double *euler_y
, double *euler_z
);
53 extern int hkl_matrix_cmp(const HklMatrix
*self
, const HklMatrix
*m
);
55 extern void hkl_matrix_times_matrix(HklMatrix
*self
, const HklMatrix
*m
);
57 extern void hkl_matrix_times_vector(const HklMatrix
*self
, HklVector
*v
);
59 extern void hkl_matrix_transpose(HklMatrix
*self
);
61 extern double hkl_matrix_det(const HklMatrix
*self
);
63 extern int hkl_matrix_solve(const HklMatrix
*self
,
64 HklVector
*x
, const HklVector
*b
);
66 extern int hkl_matrix_is_null(const HklMatrix
*self
);