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
22 * @brief Partitioned Boolean Quadratic Problem (PBQP) solver.
24 * @author Sebastian Buchwald
33 * Create an empty PBQP instance with the given number of nodes.
35 pbqp_t* alloc_pbqp(unsigned number_nodes);
38 * Free the given PBQP.
40 void free_pbqp(pbqp_t *pbqp);
43 * Add costs vector to given node.
45 void add_node_costs(pbqp_t *pbqp, unsigned node_index, vector_t *costs);
48 * Add costs matrix between given nodes.
50 void add_edge_costs(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index,
51 pbqp_matrix_t *costs);
53 pbqp_edge_t *get_edge(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index);
54 pbqp_node_t *get_node(pbqp_t *pbqp, unsigned index);
56 num get_node_solution(pbqp_t *pbqp, unsigned node_index);
57 num get_solution(pbqp_t *pbqp);
59 void set_dumpfile(pbqp_t *pbqp, FILE *f);
61 #endif /* KAPS_KAPS_H */