|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.algo.NetworkFlows
public class NetworkFlows
Provides sophisticated algorithms for solving classical network flow problems like MinCostFlow or MaxFlow.
Constructor Summary | |
---|---|
NetworkFlows()
|
Method Summary | |
---|---|
static int |
calcMaxFlow(Graph graph,
Node source,
Node sink,
DataProvider eCapDP,
EdgeMap flowEM)
Solves a maximum flow problem using the preflow-push method. |
static int |
calcMaxFlowMinCut(Graph graph,
Node source,
Node sink,
DataProvider eCapDP,
EdgeMap flowEM,
NodeMap sourceCutNM)
Like calcMaxFlow(Graph,Node,Node,DataProvider,EdgeMap) this method
solves a maximum flow problem. |
static int |
minCostFlow(Graph graph,
DataProvider lCapDP,
DataProvider uCapDP,
DataProvider cost0DP,
DataProvider supplyDP,
EdgeMap flowEM,
NodeMap dualsNM)
Solves a minimum cost flow problem with a capacity scaling algorithm. |
static int |
minCostFlow(Graph graph,
DataProvider uCapDP,
DataProvider cost0DP,
DataProvider supplyDP,
EdgeMap flowEM,
NodeMap dualsNM)
Solves a min-cost flow optimization problem. |
static int |
minCostFlow(Graph graph,
Node s,
Node t,
DataProvider uCapDP,
DataProvider cost0DP,
EdgeMap flowEM,
NodeMap dualsNM)
Solves a min-cost max-flow optimization problem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkFlows()
Method Detail |
---|
public static int minCostFlow(Graph graph, DataProvider lCapDP, DataProvider uCapDP, DataProvider cost0DP, DataProvider supplyDP, EdgeMap flowEM, NodeMap dualsNM)
Integer.MAX_VALUE
.
There are no restriction for the costs, especially they
can be negative.
Solves a min-cost flow optimization problem.
graph
- the network.lCapDP
- the lower bound on the arc flow.
May be null
.uCapDP
- the capacity of the arcs.
Infinite capacity is denoted by
Integer.MAX_VALUE
cost0DP
- the costs of the arcs.supplyDP
- the supply/demand of the nodes.
Supply is denoted by a positive value, demand by a
negative value.flowEM
- here the resulting flow is stored.dualsNM
- here the resulting dual values are stored.
Dual values are also referred as potentials.
May be null
.
public static int minCostFlow(Graph graph, DataProvider uCapDP, DataProvider cost0DP, DataProvider supplyDP, EdgeMap flowEM, NodeMap dualsNM)
graph
- the network.uCapDP
- the capacity of the arcs.
Infinite capacity is denoted by
Integer.MAX_VALUE
cost0DP
- the costs of the arcs.supplyDP
- the supply/demand of the nodes.
Supply is denoted by a positive value, demand by a
negative value.flowEM
- here the resulting flow is stored.dualsNM
- here the resulting dual values are stored.
Dual values are also referred as potentials.
public static int minCostFlow(Graph graph, Node s, Node t, DataProvider uCapDP, DataProvider cost0DP, EdgeMap flowEM, NodeMap dualsNM)
graph
- the network.s
- source of the network.t
- sink of the network.uCapDP
- the capacity of the arcs.
Infinite capacity is denoted by
Integer.MAX_VALUE
cost0DP
- the costs of the arcs.flowEM
- here the resulting flow is stored.dualsNM
- here the resulting dual values are stored.
Dual values are also referred as potentials.
public static int calcMaxFlow(Graph graph, Node source, Node sink, DataProvider eCapDP, EdgeMap flowEM)
Integer.MAX_VALUE
.
graph
- the network.source
- the source of the network.sink
- the sink of the network.eCapDP
- the capacity of the arcs.
Infinite capacity is denoted by
Integer.MAX_VALUE
flowEM
- here the resulting flow is stored.
public static int calcMaxFlowMinCut(Graph graph, Node source, Node sink, DataProvider eCapDP, EdgeMap flowEM, NodeMap sourceCutNM)
calcMaxFlow(Graph,Node,Node,DataProvider,EdgeMap)
this method
solves a maximum flow problem. Additionally, this method marks all nodes
that belong to the minimum cut set that is associated with the
source of the network.
sourceCutNM
- return value. This map will provide a boolean value for each node
that indicates whether or not a node belongs to the cut set associated
with the source of the network.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |