public abstract class FlowAlgorithmBase extends Object implements FlowAlgorithm
| Modifier and Type | Method and Description |
|---|---|
double |
getCapacity(int uIndex,
int vIndex)
Shortcut
getCapacity(Node, Node). |
double |
getCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.Node v)
Get capacity of edge (u,v).
|
double |
getCapacity(String uId,
String vId)
Shortcut
getCapacity(Node, Node). |
String |
getCapacityAttribute()
Get the key attribute from which capacities are loaded.
|
double |
getFlow(int uIndex,
int vIndex)
Shortcut to
getFlow(Node, Node). |
double |
getFlow(org.graphstream.graph.Node u,
org.graphstream.graph.Node v)
Get flow value of edge (u,v).
|
double |
getFlow(String uId,
String vId)
Shortcut to
getFlow(Node, Node). |
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 graph)
Initialization of the algorithm.
|
void |
init(org.graphstream.graph.Graph g,
String sourceId,
String sinkId)
Init the algorithm.
|
void |
setAllCapacities(double value) |
void |
setCapacity(int uIndex,
int vIndex,
double capacity)
Shortcut to
setCapacity(Node, Node, double). |
void |
setCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.Node v,
double capacity)
Set capacity of (u,v).
|
void |
setCapacity(String uId,
String vId,
double capacity)
Shortcut to
setCapacity(Node, Node, double). |
void |
setCapacityAttribute(String attribute)
Set the key of the attribute from which capacities will be loaded.
|
void |
setFlow(int uIndex,
int vIndex,
double flow)
Shortcut to
setFlow(Node, Node, double). |
void |
setFlow(org.graphstream.graph.Node u,
org.graphstream.graph.Node v,
double flow)
Set flow of edge (u,v).
|
void |
setFlow(String uId,
String vId,
double flow)
Shortcut to
setFlow(Node, Node, double). |
public String getFlowSourceId()
FlowAlgorithmgetFlowSourceId in interface FlowAlgorithmpublic String getFlowSinkId()
FlowAlgorithmgetFlowSinkId in interface FlowAlgorithmpublic void init(org.graphstream.graph.Graph graph)
AlgorithmAlgorithm.compute() method to initialize or reset the algorithm according
to the new given graph.public void init(org.graphstream.graph.Graph g,
String sourceId,
String sinkId)
FlowAlgorithmAlgorithm.init(Graph) method
of Algorithm so users just have to call this new method.init in interface FlowAlgorithmg - graph that should be used by the algorithmsourceId - id of the source of the flowsinkId - id of the sink of the flowpublic double getMaximumFlow()
FlowAlgorithmAlgorithm.compute().getMaximumFlow in interface FlowAlgorithmpublic double getFlow(int uIndex,
int vIndex)
getFlow(Node, Node).uIndex - index of sourcevIndex - index of targetpublic double getFlow(String uId, String vId)
getFlow(Node, Node).uId - id of sourcevId - id of targetpublic double getFlow(org.graphstream.graph.Node u,
org.graphstream.graph.Node v)
FlowAlgorithmgetFlow in interface FlowAlgorithmpublic void setFlow(int uIndex,
int vIndex,
double flow)
setFlow(Node, Node, double).uIndex - index of uvIndex - index of vflow - new float of (u,v)public void setFlow(String uId, String vId, double flow)
setFlow(Node, Node, double).uId - id of uvId - id of vflow - new float of (u,v)public void setFlow(org.graphstream.graph.Node u,
org.graphstream.graph.Node v,
double flow)
FlowAlgorithmsetFlow in interface FlowAlgorithmflow - new flowpublic double getCapacity(int uIndex,
int vIndex)
getCapacity(Node, Node).uIndex - index of uvIndex - index of vpublic double getCapacity(String uId, String vId)
getCapacity(Node, Node).uId - id of uvId - id of vpublic double getCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.Node v)
FlowAlgorithmgetCapacity in interface FlowAlgorithmpublic void setCapacity(int uIndex,
int vIndex,
double capacity)
setCapacity(Node, Node, double).uIndex - index of uvIndex - index of vcapacity - new capacity of (u,v)public void setCapacity(String uId, String vId, double capacity)
setCapacity(Node, Node, double).uId - id of uvId - id of vcapacity - new capacity of (u,v)public void setCapacity(org.graphstream.graph.Node u,
org.graphstream.graph.Node v,
double capacity)
FlowAlgorithmFlowAlgorithm.init(Graph, String, String) and Algorithm.compute().setCapacity in interface FlowAlgorithmcapacity - new capacity of (u,v)public void setCapacityAttribute(String attribute)
FlowAlgorithmAlgorithm.compute().setCapacityAttribute in interface FlowAlgorithmpublic String getCapacityAttribute()
FlowAlgorithmgetCapacityAttribute in interface FlowAlgorithmFlowAlgorithm.setCapacityAttribute(String)public void setAllCapacities(double value)
Copyright © 2015. All rights reserved.