X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=matrix.h;h=a9d26a05832820e2554a5c03a4a4c3ae543b084c;hb=1e55edf5bc39624d95f8b16ab13084cbe37b7f35;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=d01193ed5f4474a0f51b2b8dd809f5b39ac9b722;p=libfirm diff --git a/matrix.h b/matrix.h index e69de29bb..a9d26a058 100644 --- a/matrix.h +++ b/matrix.h @@ -0,0 +1,28 @@ +#ifndef KAPS_MATRIX_H +#define KAPS_MATRIX_H + +#include "matrix_t.h" + +pbqp_matrix *pbqp_matrix_alloc(pbqp *pbqp, unsigned rows, unsigned cols); + +/* Copy the given matrix. */ +pbqp_matrix *pbqp_matrix_copy(pbqp *pbqp, pbqp_matrix *m); + +pbqp_matrix *pbqp_matrix_copy_and_transpose(pbqp *pbqp, pbqp_matrix *m); + +/* sum += summand */ +void pbqp_matrix_add(pbqp_matrix *sum, pbqp_matrix *summand); + +void pbqp_matrix_set(pbqp_matrix *mat, unsigned row, unsigned col, num value); + +num pbqp_matrix_get_col_min(pbqp_matrix *matrix, unsigned col_index, vector *flags); +num pbqp_matrix_get_row_min(pbqp_matrix *matrix, unsigned row_index, vector *flags); + +void pbqp_matrix_sub_col_value(pbqp_matrix *matrix, unsigned col_index, + vector *flags, num value); +void pbqp_matrix_sub_row_value(pbqp_matrix *matrix, unsigned row_index, + vector *flags, num value); + +int pbqp_matrix_is_zero(pbqp_matrix *mat, vector *src_vec, vector *tgt_vec); + +#endif /* KAPS_MATRIX_H */