Home | History | Annotate | Download | only in tests

Lines Matching refs:elem_t

28 typedef double elem_t;
34 elem_t* a;
56 static elem_t* new_matrix(const int rows, const int cols)
60 return malloc(rows * cols * sizeof(elem_t));
64 static void delete_matrix(elem_t* const a)
70 static void init_matrix(elem_t* const a, const int rows, const int cols)
84 const elem_t* const a, const int rows, const int cols)
99 static void copy_matrix(const elem_t* const from,
106 elem_t* const to,
135 static elem_t* multiply_matrices(const elem_t* const a1,
138 const elem_t* const a2,
143 elem_t* prod;
173 elem_t* const a = p->a;
176 elem_t aii;
195 const elem_t t = a[i * cols + k];
212 const elem_t factor = a[j * cols + i];
223 static void gj(elem_t* const a, const int rows, const int cols)
265 static elem_t* invert_matrix(const elem_t* const a, const int n)
268 elem_t* const inv = new_matrix(n, n);
269 elem_t* const tmp = new_matrix(n, 2*n);
283 static double identity_error(const elem_t* const a, const int n)
286 elem_t e = 0;
291 const elem_t d = a[i * n + j] - (i == j);
298 /** Compute epsilon for the numeric type elem_t. Epsilon is defined as the
300 * one. It is assumed that the underlying representation of elem_t uses
303 static elem_t epsilon()
305 elem_t eps;
316 elem_t *a, *inv, *prod;
317 elem_t eps;