|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FlowAlgorithm
Defines algorithm used to compute maximum flow.
Method Summary | |
---|---|
double |
getCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.Node v)
Get capacity of edge (u,v). |
String |
getCapacityAttribute()
Get the key attribute from which capacities are loaded. |
double |
getFlow(org.graphstream.graph.Node u,
org.graphstream.graph.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(org.graphstream.graph.Graph g,
String sourceId,
String sinkId)
Init the algorithm. |
void |
setCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.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(org.graphstream.graph.Node u,
org.graphstream.graph.Node v,
double flow)
Set flow of edge (u,v). |
Methods inherited from interface org.graphstream.algorithm.Algorithm |
---|
compute, init |
Method Detail |
---|
double getFlow(org.graphstream.graph.Node u, org.graphstream.graph.Node v)
u
- v
-
void setFlow(org.graphstream.graph.Node u, org.graphstream.graph.Node v, double flow)
u
- v
- flow
- new flowdouble getCapacity(org.graphstream.graph.Node u, org.graphstream.graph.Node v)
u
- v
-
void setCapacity(org.graphstream.graph.Node u, org.graphstream.graph.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(org.graphstream.graph.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 flow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |