bipartite_match.h File Reference
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Typedef Documentation
◆ BipartiteMatchState
Function Documentation
◆ BipartiteMatch()
int
v_size,
short **
adjacency
)
Definition at line 39 of file bipartite_match.c.
40{
42
43 if (u_size < 0 || u_size >= SHRT_MAX ||
44 v_size < 0 || v_size >= SHRT_MAX)
45 elog(
ERROR,
"invalid set size for BipartiteMatch");
46
47 state->u_size = u_size;
48 state->v_size = v_size;
49 state->adjacency = adjacency;
51 state->pair_uv = (
short *)
palloc0((u_size + 1) *
sizeof(short));
52 state->pair_vu = (
short *)
palloc0((v_size + 1) *
sizeof(short));
53 state->distance = (
short *)
palloc((u_size + 1) *
sizeof(short));
54 state->queue = (
short *)
palloc((u_size + 2) *
sizeof(short));
55
57 {
58 int u;
59
60 for (u = 1; u <= u_size; u++)
61 {
62 if (
state->pair_uv[u] == 0)
65 }
66
68 }
69
71}
static bool hk_depth_search(BipartiteMatchState *state, int u)
static bool hk_breadth_search(BipartiteMatchState *state)
void * palloc0(Size size)
#define CHECK_FOR_INTERRUPTS()
References CHECK_FOR_INTERRUPTS, elog, ERROR, hk_breadth_search(), hk_depth_search(), palloc(), and palloc0().
Referenced by extract_rollup_sets().
◆ BipartiteMatchFree()