libFirm 1.20
|
Implements bipartite matchings. More...
#include "../begin.h"
#include "../end.h"
Go to the source code of this file.
Typedefs | |
typedef struct bipartite_t | bipartite_t |
internal representation of bipartite matching problem | |
Functions | |
bipartite_t * | bipartite_new (int n_left, int n_right) |
Create new bipartite matching problem with n_left elements on left side and n_right elements on right side. | |
void | bipartite_free (bipartite_t *gr) |
Free memory occupied by bipartite matching problem. | |
void | bipartite_add (bipartite_t *gr, int i, int j) |
Add edge from i (on the left side) to j (on the right side) | |
void | bipartite_remv (bipartite_t *gr, int i, int j) |
Remove edge from i (on the left side) to j (on the right side) | |
int | bipartite_adj (const bipartite_t *gr, int i, int j) |
Return 1 if edge from i (on the left side) to j (on the right side) exists, 0 otherwise. | |
void | bipartite_matching (const bipartite_t *gr, int *matching) |
Solve bipartite matching problem. | |
void | bipartite_dump_f (FILE *f, const bipartite_t *gr) |
Dumps a bipartite graph to a file stream. | |
void | bipartite_dump (const char *name, const bipartite_t *gr) |
Dumps a bipartite graph to file name. |