diff options
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/integer_matrix.c | 6 | ||||
-rw-r--r-- | libcrystfel/src/integer_matrix.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c index 9431d189..c633a620 100644 --- a/libcrystfel/src/integer_matrix.c +++ b/libcrystfel/src/integer_matrix.c @@ -247,6 +247,12 @@ IntegerMatrix *intmat_intmat_mult(const IntegerMatrix *a, } +void intmat_zero(IntegerMatrix *m) +{ + memset(m->v, 0, m->rows*m->cols*sizeof(signed int)); +} + + static IntegerMatrix *delete_row_and_column(const IntegerMatrix *m, unsigned int di, unsigned int dj) { diff --git a/libcrystfel/src/integer_matrix.h b/libcrystfel/src/integer_matrix.h index dcbe63bc..5a365f0a 100644 --- a/libcrystfel/src/integer_matrix.h +++ b/libcrystfel/src/integer_matrix.h @@ -64,6 +64,8 @@ extern void intmat_set(IntegerMatrix *m, unsigned int i, unsigned int j, extern signed int intmat_get(const IntegerMatrix *m, unsigned int i, unsigned int j); +extern void intmat_zero(IntegerMatrix *m); + extern 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); |