Added file headers.
[libfirm] / kaps.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Partitioned Boolean Quadratic Problem (PBQP) solver.
23  * @date    02.10.2008
24  * @author  Sebastian Buchwald
25  * @version $Id$
26  */
27 #ifndef KAPS_KAPS_H
28 #define KAPS_KAPS_H
29
30 #include "pbqp_t.h"
31
32 /**
33  * Create an empty PBQP instance with the given number of nodes.
34  */
35 pbqp* alloc_pbqp(unsigned number_nodes);
36
37 /**
38  * Free the given PBQP.
39  */
40 void free_pbqp(pbqp *pbqp);
41
42 /**
43  * Add costs vector to given node.
44  */
45 void add_node_costs(pbqp *pbqp, unsigned node_index, vector *costs);
46
47 /**
48  * Add costs matrix between given nodes.
49  */
50 void add_edge_costs(pbqp *pbqp, unsigned src_index, unsigned tgt_index, pbqp_matrix *costs);
51
52 pbqp_edge *get_edge(pbqp *pbqp, unsigned src_index, unsigned tgt_index);
53 pbqp_node *get_node(pbqp *pbqp, unsigned index);
54
55 num get_node_solution(pbqp *pbqp, unsigned node_index);
56 num get_solution(pbqp *pbqp);
57
58 void set_dumpfile(pbqp *pbqp, FILE *f);
59
60 #endif /* KAPS_KAPS_H */