public interface FlowAlgorithm extends Algorithm
Modifier and Type | Method and Description |
---|---|
double |
getCapacity(Node u,
Node v)
Get capacity of edge (u,v).
|
String |
getCapacityAttribute()
Get the key attribute from which capacities are loaded.
|
double |
getFlow(Node u,
Node v)
Get flow value of edge (u,v).
|
String |
getFlowSinkId()
Get id of the sink.
|
String |
getFlowSourceId()
Get id of the source.
|
double |
getMaximumFlow()
Get maximum flow compute by
Algorithm.compute() . |
void |
init(Graph g,
String sourceId,
String sinkId)
Init the algorithm.
|
void |
setCapacity(Node u,
Node v,
double capacity)
Set capacity of (u,v).
|
void |
setCapacityAttribute(String attribute)
Set the key of the attribute from which capacities will be loaded.
|
void |
setFlow(Node u,
Node v,
double flow)
Set flow of edge (u,v).
|
double getFlow(Node u, Node v)
u
- v
- void setFlow(Node u, Node v, double flow)
u
- v
- flow
- new flowdouble getCapacity(Node u, Node v)
u
- v
- void setCapacity(Node u, Node v, double capacity)
init(Graph, String, String)
and Algorithm.compute()
.u
- v
- capacity
- new capacity of (u,v)void setCapacityAttribute(String attribute)
Algorithm.compute()
.attribute
- String getCapacityAttribute()
setCapacityAttribute(String)
double getMaximumFlow()
Algorithm.compute()
.String getFlowSourceId()
String getFlowSinkId()
void init(Graph g, String sourceId, String sinkId)
Algorithm.init(Graph)
method
of Algorithm so users just have to call this new method.g
- graph that should be used by the algorithmsourceId
- id of the source of the flowsinkId
- id of the sink of the flowWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses