becopyilp: Inline struct size_red_t into struct ilp_env_t.
[libfirm] / ir / kaps / kaps.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   Partitioned Boolean Quadratic Problem (PBQP) solver.
9  * @date    02.10.2008
10  * @author  Sebastian Buchwald
11  */
12 #ifndef KAPS_KAPS_H
13 #define KAPS_KAPS_H
14
15 #include "pbqp_t.h"
16
17 /**
18  * Create an empty PBQP instance with the given number of nodes.
19  */
20 pbqp_t* alloc_pbqp(unsigned number_nodes);
21
22 /**
23  * Free the given PBQP.
24  */
25 void free_pbqp(pbqp_t *pbqp);
26
27 /**
28  * Add costs vector to given node.
29  */
30 void add_node_costs(pbqp_t *pbqp, unsigned node_index, vector_t *costs);
31
32 /**
33  * Add costs matrix between given nodes.
34  */
35 void add_edge_costs(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index,
36                     pbqp_matrix_t *costs);
37
38 pbqp_edge_t *get_edge(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index);
39 pbqp_node_t *get_node(pbqp_t *pbqp, unsigned index);
40
41 num get_node_solution(pbqp_t *pbqp, unsigned node_index);
42 num get_solution(pbqp_t *pbqp);
43
44 void set_dumpfile(pbqp_t *pbqp, FILE *f);
45
46 #endif /* KAPS_KAPS_H */