Interface IFlow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description doublegetFlow(int edge)Get the amount of flow units going along an edge.default doublegetFlow(Integer edge)Deprecated.doublegetSupply(int vertex)Get the sum of flow units going out of a vertex, minus the sum of flow units going into a vertex.default doublegetSupply(Integer vertex)Deprecated.-
Methods inherited from interface com.jgalgo.alg.Flow
getSupplySubset, getTotalCost
-
-
-
-
Method Detail
-
getFlow
double getFlow(int edge)
Get the amount of flow units going along an edge.If the graph is directed, a flow of \(f\) units on
e, for \(0 \leq f \leq cap(e)\), means a flow of \(f\) units of flow fromedgeSource(e)toedgeTarget(e).If the graph is undirected, a flow of \(+f\) units on
e, for \(0 \leq f \leq cap(e)\), means a flow of \(f\) units of flow fromedgeSource(e)toedgeTarget(e), while a flow of \(-f\) units one, for \(-cap(e) \leq -f \leq 0\), means a flow of \(|-f|\) units of flow fromedgeTarget(e)toedgeSource(e)(opposite direction).- Parameters:
edge- an edge in the graph- Returns:
- the amount of flow units going along an edge
- Throws:
NoSuchEdgeException- ifedgeis not a valid edge
-
getFlow
@Deprecated default double getFlow(Integer edge)
Deprecated.Description copied from interface:FlowGet the amount of flow units going along an edge.If the graph is directed, a flow of \(f\) units on
e, for \(0 \leq f \leq cap(e)\), means a flow of \(f\) units of flow fromedgeSource(e)toedgeTarget(e).If the graph is undirected, a flow of \(+f\) units on
e, for \(0 \leq f \leq cap(e)\), means a flow of \(f\) units of flow fromedgeSource(e)toedgeTarget(e), while a flow of \(-f\) units one, for \(-cap(e) \leq -f \leq 0\), means a flow of \(|-f|\) units of flow fromedgeTarget(e)toedgeSource(e)(opposite direction).
-
getSupply
double getSupply(int vertex)
Get the sum of flow units going out of a vertex, minus the sum of flow units going into a vertex.In the classical maximum flow problem with two terminal nodes
sandt, the supply ofsis the total amount of flow in the network, and it is equal to the negative of the supply oft. The negative of the supply is sometimes called the demand. For any other vertex, the supply is zero.- Parameters:
vertex- a vertex in the graph- Returns:
- the sum of flow units going out of a vertex, minus the sum of flow units going into a vertex
-
getSupply
@Deprecated default double getSupply(Integer vertex)
Deprecated.Description copied from interface:FlowGet the sum of flow units going out of a vertex, minus the sum of flow units going into a vertex.In the classical maximum flow problem with two terminal nodes
sandt, the supply ofsis the total amount of flow in the network, and it is equal to the negative of the supply oft. The negative of the supply is sometimes called the demand. For any other vertex, the supply is zero.
-
-