|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.algo.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 |
minCostFlow(Graph graph,
DataProvider lCapDP,
DataProvider uCapDP,
DataProvider cost0DP,
DataProvider supplyDP,
EdgeMap flowEM,
NodeMap dualsNM)
Solves a mimium 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 maxflow 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)
Edges may have infinite capacity, which is dennoted by
the value 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)
Edges may have infinite capacity, which is dennoted by
the value 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.
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |