|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inria.opengve.bridge.algorithms.common.AugmentingPath<V,E,G>
public abstract class AugmentingPath<V,E extends Link<V>,G extends Graph<V,E>>
This class construct augmenting path on a graph. This class is for example
used in the class EdmondsKarp. The use of
this class begin by is initialization.
setCostMap(Map)
setCostName(String)
setCostContext(Object).
You can set the map cost to
null for a cost of one for all edges.
After this initialization each call to getBestPath(Object,Object)
return the path between two vertices with a minimum cost. You can get the
quantity of flow used by the last returned Path with getFlow().
| Constructor Summary | |
|---|---|
AugmentingPath(G g)
Constructor of AugmentingPath flow algorithm. |
|
| Method Summary | |
|---|---|
protected abstract AbstractScalar |
createInteger(int value)
Create a new AbstractScalar (Integer type). |
protected abstract Path<V,E> |
createPath()
Create a new empty path of the same type that graph g. |
Path<V,E> |
getBestPath(V source,
V destination)
Return the shortest path (in term of cost) with the maximum quantity of flow. |
AbstractScalar |
getFlow()
Return the value of flow of the last retured path. |
void |
setCapacityContext(java.lang.Object capacityContext)
Set the context used to load capacity in the map. |
void |
setCapacityMap(Map capacityMap)
Set the map used to load capacity. |
void |
setCapacityName(java.lang.String capacityName)
Set the name used to load capacity in the map. |
void |
setCostContext(java.lang.Object costContext)
Set the context used to load cost in the map. |
void |
setCostMap(Map costMap)
Set the map used to load cost. |
void |
setCostName(java.lang.String costName)
Set the name used to load cost in the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AugmentingPath(G g)
AugmentingPath flow algorithm.
g - The graph.| Method Detail |
|---|
protected abstract Path<V,E> createPath()
protected abstract AbstractScalar createInteger(int value)
value - The value of the new AbstractScalar.
AbstractScalar.public void setCapacityMap(Map capacityMap)
capacityMap - The map used to load capacity.public void setCapacityName(java.lang.String capacityName)
capacityName - The name used to load capacity in the map.public void setCapacityContext(java.lang.Object capacityContext)
null
to specify default context value.
capacityContext - The context used to load capacity in the map.public void setCostMap(Map costMap)
costMap - The map used to load cost.public void setCostName(java.lang.String costName)
costName - The name used to load cost in the map.public void setCostContext(java.lang.Object costContext)
null to
specify default context value.
costContext - The context used to load cost in the map.public Path<V,E> getBestPath(V source, V destination)
public AbstractScalar getFlow()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||