BipatiteMatching

Undocumented in source.

Constructors

this
this(size_t L, size_t R)
Undocumented in source.

Members

Functions

addEdge
void addEdge(size_t l, size_t r)

add edge(l, r)

cngLeftVertexEdge
void cngLeftVertexEdge(size_t l, int[] v)

cng left_l's edge

delEdge
void delEdge(size_t l, size_t r)

del edge(l, r)

dfs
bool dfs(int l)
Undocumented in source. Be warned that the author may not have intended to support it.
maximize
void maximize()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

L
int L;
R
int R;
count
int count;
Undocumented in source.
g
int[][] g;
Undocumented in source.
lmt
int[] lmt;
rmt
int[] rmt;
Undocumented in source.
vc
int vc;
Undocumented in source.
visited
int[] visited;
Undocumented in source.

Examples

auto bm = BipatiteMatching(3, 3);
bm.addEdge(0, 0);
bm.addEdge(0, 1);
bm.addEdge(1, 1);
bm.addEdge(2, 1);
assert(bm.count == 2); // example: (0, 0), (1, 1)
bm.addEdge(1, 2);
assert(bm.count == 3); // (0, 0), (1, 2), (2, 1)
bm.delEdge(2, 1);
assert(bm.count == 2); // example: (0, 0) (1, 2)

Meta