Continued refactoring.
[libfirm] / kaps.h
1 #ifndef KAPS_KAPS_H
2 #define KAPS_KAPS_H
3
4 #include "pbqp_t.h"
5
6 /**
7  * Create an empty PBQP instance with the given number of nodes.
8  */
9 pbqp* alloc_pbqp(unsigned number_nodes);
10
11 /**
12  * Free the given PBQP.
13  */
14 void free_pbqp(pbqp *pbqp);
15
16 /**
17  * Add costs vector to given node.
18  */
19 void add_node_costs(pbqp *pbqp, unsigned node_index, vector *costs);
20
21 /**
22  * Add costs matrix between given nodes.
23  */
24 void add_edge_costs(pbqp *pbqp, unsigned src_index, unsigned tgt_index, pbqp_matrix *costs);
25
26 pbqp_edge *get_edge(pbqp *pbqp, unsigned src_index, unsigned tgt_index);
27 pbqp_node *get_node(pbqp *pbqp, unsigned index);
28
29 num get_node_solution(pbqp *pbqp, unsigned node_index);
30 num get_solution(pbqp *pbqp);
31
32 void set_dumpfile(pbqp *pbqp, FILE *f);
33
34 #endif /* KAPS_KAPS_H */