libFirm 1.20
libfirm/adt/gaussseidel.h
00001 #ifndef MATRIX_H_
00002 #define MATRIX_H_
00003 
00004 #include <stdio.h>
00005 
00006 #include "../begin.h"
00007 
00008 typedef struct gs_matrix_t gs_matrix_t;
00009 
00015 gs_matrix_t *gs_new_matrix(int n_init_rows, int n_init_cols);
00016 
00020 void gs_delete_matrix(gs_matrix_t *m);
00021 
00022 void gs_matrix_assure_row_capacity(gs_matrix_t *m, int row, int min_capacity);
00023 
00024 void gs_matrix_trim_row_capacities(gs_matrix_t *m);
00025 
00026 void gs_matrix_delete_zero_entries(gs_matrix_t *m);
00027 
00032 void gs_matrix_set(gs_matrix_t *m, int row, int col, double val);
00033 
00037 double gs_matrix_get(const gs_matrix_t *m, int row, int col);
00038 
00045 double gs_matrix_gauss_seidel(const gs_matrix_t *m, double *x, int n);
00046 
00047 unsigned gs_matrix_get_n_entries(const gs_matrix_t *m);
00048 
00052 void gs_matrix_dump(const gs_matrix_t *m, int a, int b, FILE *out);
00053 
00054 int gs_matrix_get_sizeof_allocated_memory(const gs_matrix_t *m);
00055 
00056 void gs_matrix_export(const gs_matrix_t *m, double *nw, int size);
00057 
00058 #include "../end.h"
00059 
00060 #endif