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
31 pbqp_matrix_t *pbqp_matrix_alloc(pbqp_t *pbqp, unsigned rows, unsigned cols);
33 /* Copy the given matrix. */
34 pbqp_matrix_t *pbqp_matrix_copy(pbqp_t *pbqp, pbqp_matrix_t *m);
36 pbqp_matrix_t *pbqp_matrix_copy_and_transpose(pbqp_t *pbqp, pbqp_matrix_t *m);
38 void pbqp_matrix_transpose(pbqp_t *pbqp, pbqp_matrix_t *mat);
41 void pbqp_matrix_add(pbqp_matrix_t *sum, pbqp_matrix_t *summand);
43 void pbqp_matrix_set(pbqp_matrix_t *mat, unsigned row, unsigned col, num value);
45 num pbqp_matrix_get_col_min(pbqp_matrix_t *matrix, unsigned col_index, vector_t *flags);
46 num pbqp_matrix_get_row_min(pbqp_matrix_t *matrix, unsigned row_index, vector_t *flags);
48 unsigned pbqp_matrix_get_col_min_index(pbqp_matrix_t *matrix, unsigned col_index, vector_t *flags);
49 unsigned pbqp_matrix_get_row_min_index(pbqp_matrix_t *matrix, unsigned row_index, vector_t *flags);
51 void pbqp_matrix_set_col_value(pbqp_matrix_t *mat, unsigned col, num value);
52 void pbqp_matrix_set_row_value(pbqp_matrix_t *mat, unsigned row, num value);
54 void pbqp_matrix_sub_col_value(pbqp_matrix_t *matrix, unsigned col_index,
55 vector_t *flags, num value);
56 void pbqp_matrix_sub_row_value(pbqp_matrix_t *matrix, unsigned row_index,
57 vector_t *flags, num value);
59 int pbqp_matrix_is_zero(pbqp_matrix_t *mat, vector_t *src_vec, vector_t *tgt_vec);
61 void pbqp_matrix_add_to_all_cols(pbqp_matrix_t *mat, vector_t *vec);
62 void pbqp_matrix_add_to_all_rows(pbqp_matrix_t *mat, vector_t *vec);
64 #endif /* KAPS_MATRIX_H */