fix doxygen warning
[libfirm] / include / libfirm / adt / gaussseidel.h
1 #ifndef MATRIX_H_
2 #define MATRIX_H_
3
4 #include <stdio.h>
5
6 #include "../begin.h"
7
8 typedef struct gs_matrix_t gs_matrix_t;
9
10 /**
11  * Allocate a new matrix and init internal data for a matrix of size
12  * row_init X col_init. Matrix cannot grow beyond these init values.
13  * All elements are initially (implicitly) set to 0.
14  */
15 gs_matrix_t *gs_new_matrix(int n_init_rows, int n_init_cols);
16
17 /**
18  * Free space used by matrix m
19  */
20 void gs_delete_matrix(gs_matrix_t *m);
21
22 void gs_matrix_assure_row_capacity(gs_matrix_t *m, int row, int min_capacity);
23
24 void gs_matrix_trim_row_capacities(gs_matrix_t *m);
25
26 void gs_matrix_delete_zero_entries(gs_matrix_t *m);
27
28 /**
29  * Sets m[row, col] to val
30  * @p increase If non-zero @p val is added to the existing
31  */
32 void gs_matrix_set(gs_matrix_t *m, int row, int col, double val);
33
34 /**
35  * Returns the value stored in m[row, col].
36  */
37 double gs_matrix_get(const gs_matrix_t *m, int row, int col);
38
39 /**
40  * Performs one step of the Gauss-Seidel algorithm
41  * @p m         The iteration matrix
42  * @p x         The iteration vector
43  * @p a         The dimension of the matrix (axa matrix)
44  */
45 double gs_matrix_gauss_seidel(const gs_matrix_t *m, double *x, int n);
46
47 unsigned gs_matrix_get_n_entries(const gs_matrix_t *m);
48
49 /**
50  * Dumps the matrix factor*m to the stream @p out.
51  */
52 void gs_matrix_dump(const gs_matrix_t *m, int a, int b, FILE *out);
53
54 int gs_matrix_get_sizeof_allocated_memory(const gs_matrix_t *m);
55
56 void gs_matrix_export(const gs_matrix_t *m, double *nw, int size);
57
58 #include "../end.h"
59
60 #endif