16 #ifndef HELIB_MATCHING_H
17 #define HELIB_MATCHING_H
19 #include <unordered_map>
20 #include <helib/NumbTh.h>
74 void addEdge(
long nn,
long l = 0,
long c = 0)
94 std::vector<LabeledVertex>
left;
96 void addEdge(
long from,
long to,
long label,
long color = 0)
98 for (
long sz =
left.size(); sz <= from; sz++)
100 left.at(from).addEdge(to, label, color);
A bipartite flow graph.
Definition: matching.h:89
void addEdge(long from, long to, long label, long color=0)
Definition: matching.h:96
void printout()
Definition: matching.cpp:37
std::vector< LabeledVertex > left
Definition: matching.h:94
void partitionToMatchings()
Definition: matching.cpp:53
An edge in a flow graph.
Definition: matching.h:26
long flow
Definition: matching.h:28
long capacity
Definition: matching.h:28
FlowEdge(long c=0, long f=0)
Definition: matching.h:29
A generic directed edge in a graph with some labels.
Definition: matching.h:48
LabeledEdge(long f, long t, long l=0, long c=0)
Definition: matching.h:53
long from
Definition: matching.h:50
long color
Definition: matching.h:52
long label
Definition: matching.h:51
long to
Definition: matching.h:50
A generic node in a graph with some labels.
Definition: matching.h:67
LabeledVertex(long n, long l=0)
Definition: matching.h:72
void addNeighbor(long nn, long l=0, long c=0)
Definition: matching.h:79
LNeighborList neighbors
Definition: matching.h:71
long label
Definition: matching.h:70
long name
Definition: matching.h:69
void addEdge(long nn, long l=0, long c=0)
Definition: matching.h:74
Definition: apiAttributes.h:21
std::unordered_map< long, FlowEdge > FNeighborList
Definition: matching.h:36
long maximum_flow(FlowGraph &fg, long src, long sink)
Definition: matching.cpp:177
std::unordered_multimap< long, LabeledEdge > LNeighborList
Definition: matching.h:62
std::vector< FNeighborList > FlowGraph
Definition: matching.h:39