diff options
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/integer_matrix.c | 64 | ||||
-rw-r--r-- | libcrystfel/src/integer_matrix.h | 4 |
2 files changed, 0 insertions, 68 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c index 1b448771..b6f55ac2 100644 --- a/libcrystfel/src/integer_matrix.c +++ b/libcrystfel/src/integer_matrix.c @@ -177,70 +177,6 @@ signed int intmat_get(const IntegerMatrix *m, unsigned int i, unsigned int j) } -/* intmat_intvec_mult: - * @m: An %IntegerMatrix - * @vec: An array of floats - * @ans: An array of floats in which to store the result - * - * Multiplies the matrix @m by the vector @vec. The size of @vec must equal the - * number of columns in @m, and the size of the result equals the number of rows - * in @m. - * - * Returns: non-zero on error - **/ -int intmat_floatvec_mult(const IntegerMatrix *m, const float *vec, float *ans) -{ - unsigned int i; - - for ( i=0; i<m->rows; i++ ) { - - unsigned int j; - - ans[i] = 0.0; - for ( j=0; j<m->cols; j++ ) { - ans[i] += intmat_get(m, i, j) * vec[j]; - } - - } - - return 0; -} - - -/* intmat_rationalvec_mult: - * @m: An %IntegerMatrix - * @vec: An array of %Rational - * @ans: An array of %Rational in which to store the result - * - * Multiplies the matrix @m by the vector @vec. The size of @vec must equal the - * number of columns in @m, and the size of the result equals the number of rows - * in @m. - * - * Returns: non-zero on error - **/ -int intmat_rationalvec_mult(const IntegerMatrix *m, const Rational *vec, - Rational *ans) -{ - unsigned int i; - - - for ( i=0; i<m->rows; i++ ) { - - unsigned int j; - - ans[i] = rtnl_zero(); - for ( j=0; j<m->cols; j++ ) { - Rational t; - t = rtnl_mul(vec[j], rtnl(intmat_get(m, i, j), 1)); - ans[i] = rtnl_add(ans[i], t); - } - - } - - return 0; -} - - /* intmat_solve_rational: * @m: An %IntegerMatrix * @vec: An array of %Rational diff --git a/libcrystfel/src/integer_matrix.h b/libcrystfel/src/integer_matrix.h index aeea38dd..2da2328a 100644 --- a/libcrystfel/src/integer_matrix.h +++ b/libcrystfel/src/integer_matrix.h @@ -71,12 +71,8 @@ extern IntegerMatrix *intmat_create_3x3(signed int m11, signed int m12, signed i signed int m31, signed int m32, signed int m33); /* Matrix-vector multiplication */ -extern int intmat_floatvec_mult(const IntegerMatrix *m, const float *vec, - float *ans); extern signed int *intmat_intvec_mult(const IntegerMatrix *m, const signed int *vec); -extern int intmat_rationalvec_mult(const IntegerMatrix *m, const Rational *vec, - Rational *ans); /* Matrix-matrix multiplication */ extern IntegerMatrix *intmat_intmat_mult(const IntegerMatrix *a, |