2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * @author Sebastian Buchwald
32 pbqp_matrix *pbqp_matrix_alloc(pbqp *pbqp, unsigned rows, unsigned cols);
34 /* Copy the given matrix. */
35 pbqp_matrix *pbqp_matrix_copy(pbqp *pbqp, pbqp_matrix *m);
37 pbqp_matrix *pbqp_matrix_copy_and_transpose(pbqp *pbqp, pbqp_matrix *m);
39 void pbqp_matrix_transpose(pbqp *pbqp, pbqp_matrix *mat);
42 void pbqp_matrix_add(pbqp_matrix *sum, pbqp_matrix *summand);
44 void pbqp_matrix_set(pbqp_matrix *mat, unsigned row, unsigned col, num value);
46 num pbqp_matrix_get_col_min(pbqp_matrix *matrix, unsigned col_index, vector *flags);
47 num pbqp_matrix_get_row_min(pbqp_matrix *matrix, unsigned row_index, vector *flags);
49 unsigned pbqp_matrix_get_col_min_index(pbqp_matrix *matrix, unsigned col_index, vector *flags);
50 unsigned pbqp_matrix_get_row_min_index(pbqp_matrix *matrix, unsigned row_index, vector *flags);
52 void pbqp_matrix_set_col_value(pbqp_matrix *mat, unsigned col, num value);
53 void pbqp_matrix_set_row_value(pbqp_matrix *mat, unsigned row, num value);
55 void pbqp_matrix_sub_col_value(pbqp_matrix *matrix, unsigned col_index,
56 vector *flags, num value);
57 void pbqp_matrix_sub_row_value(pbqp_matrix *matrix, unsigned row_index,
58 vector *flags, num value);
60 int pbqp_matrix_is_zero(pbqp_matrix *mat, vector *src_vec, vector *tgt_vec);
62 void pbqp_matrix_add_to_all_cols(pbqp_matrix *mat, vector *vec);
63 void pbqp_matrix_add_to_all_rows(pbqp_matrix *mat, vector *vec);
65 #endif /* KAPS_MATRIX_H */