libcrystfel 0.11.1
|
Typedefs | |
typedef struct _integermatrix | IntegerMatrix |
Functions | |
IntegerMatrix * | intmat_new (unsigned int rows, unsigned int cols) |
IntegerMatrix * | intmat_copy (const IntegerMatrix *m) |
IntegerMatrix * | intmat_identity (int size) |
void | intmat_free (IntegerMatrix *m) |
void | intmat_size (const IntegerMatrix *m, unsigned int *rows, unsigned int *cols) |
void | intmat_set (IntegerMatrix *m, unsigned int i, unsigned int j, signed int v) |
signed int | intmat_get (const IntegerMatrix *m, unsigned int i, unsigned int j) |
void | intmat_zero (IntegerMatrix *m) |
IntegerMatrix * | intmat_create_3x3 (signed int m11, signed int m12, signed int m13, signed int m21, signed int m22, signed int m23, signed int m31, signed int m32, signed int m33) |
signed int * | transform_indices (const IntegerMatrix *P, const signed int *hkl) |
IntegerMatrix * | intmat_times_intmat (const IntegerMatrix *a, const IntegerMatrix *b) |
IntegerMatrix * | intmat_inverse (const IntegerMatrix *m) |
signed int | intmat_det (const IntegerMatrix *m) |
int | intmat_is_identity (const IntegerMatrix *m) |
int | intmat_is_inversion (const IntegerMatrix *m) |
int | intmat_equals (const IntegerMatrix *a, const IntegerMatrix *b) |
void | intmat_print (const IntegerMatrix *m) |
Matrix type containing only integers
typedef struct _integermatrix IntegerMatrix |
The IntegerMatrix
is an opaque data structure representing an integer matrix.
|
extern |
m | An IntegerMatrix |
m
, or NULL on error
|
extern |
m11 | Matrix element |
m12 | Matrix element |
m13 | Matrix element |
m21 | Matrix element |
m22 | Matrix element |
m23 | Matrix element |
m31 | Matrix element |
m32 | Matrix element |
m33 | Matrix element |
|
extern |
m | An IntegerMatrix |
Calculates the determinant of m
. Inefficiently.
m
.
|
extern |
a | An IntegerMatrix |
b | An IntegerMatrix |
a
= b
.
|
extern |
m | An IntegerMatrix |
Frees m
, unless m
is NULL in which case nothing is done.
|
extern |
m | An IntegerMatrix |
i | column number to set |
j | row number to set |
Gets the i
,j
element of m
.
i
,j
element of m
.
|
extern |
size | The size of the (square) matrix |
size
, or NULL on error.
|
extern |
m | An IntegerMatrix |
Calculates the inverse of m
. Inefficiently.
Works only if the inverse of the matrix is also an integer matrix, i.e. if the determinant of m
is +/- 1.
m
, or NULL on error.
|
extern |
m | An IntegerMatrix |
m
is an identity matrix.
|
extern |
m | An IntegerMatrix |
m
= -I, where I is an identity matrix.
|
extern |
rows | Number of rows that the new matrix is to have |
cols | Number of columns that the new matrix is to have |
Allocates a new IntegerMatrix with all elements set to zero.
|
extern |
|
extern |
m | An IntegerMatrix |
i | row number to set |
j | column number to set |
v | value to set to |
Sets the i
,j
element of m
to v
.
|
extern |
m | An IntegerMatrix |
rows | Location to store number of rows |
cols | Location to store number of columns |
Sets rows
and cols
to the size of m
.
|
extern |
a | An IntegerMatrix |
b | An IntegerMatrix |
Multiplies the matrix a
by the matrix b
.
|
extern |
P | An IntegerMatrix |
hkl | An array of signed integers |
Apply transformation matrix P to a set of reciprocal space Miller indices.
In other words: Multiplies the matrix P
by the row vector hkl
. The size of vec
must equal the number of columns in P
, and the size of the result equals the number of rows in P
.
The multiplication looks like this: (a1, a2, a3) = (hkl1, hkl2, hkl3) P Therefore matching the notation in ITA chapter 5.1.