fr.inria.opengve.bridge.algorithms.directed
Class ExtractFlow<V,A extends Arc<V>>

java.lang.Object
  extended by fr.inria.opengve.bridge.algorithms.directed.ExtractFlow<V,A>

public abstract class ExtractFlow<V,A extends Arc<V>>
extends java.lang.Object

This class extract STFlow from a single source multiple destination flow. You must note that each call to getFlowTo(Object) modify the initial flow.

You must initialize the AbstractScalar used as infinite value with setInfinity(AbstractScalar).

Author:
fabrice.peix@sophia.inria.fr

Constructor Summary
ExtractFlow(Graph<V,A> subGraph, V source, Flow<V,A> flow)
          Constructor.
 
Method Summary
protected abstract  Path<V,A> createDirectedPath()
          Give a new empty directed path.
protected abstract  Flow<V,A> createFlow(Graph<V,A> g)
          Create a new empty flow.
 Flow<V,A> getFlowTo(V destination)
          Give the flow from source to destination.
 void setInfinity(AbstractScalar infinity)
          Set the AbstractScalar used to represent Infinity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractFlow

public ExtractFlow(Graph<V,A> subGraph,
                   V source,
                   Flow<V,A> flow)
Constructor.

Parameters:
subGraph - The subgraph containing all and only edge with flow.
source - The source of the flow.
flow - The flow.
Method Detail

createFlow

protected abstract Flow<V,A> createFlow(Graph<V,A> g)
Create a new empty flow. The implementation of this method can return a restricted flow that represent only flow with one source and one destination.

Parameters:
g - The graph on which is define the flow.
Returns:
The new create empty flow.

createDirectedPath

protected abstract Path<V,A> createDirectedPath()
Give a new empty directed path.

Returns:
A new empty directed path.

setInfinity

public void setInfinity(AbstractScalar infinity)
Set the AbstractScalar used to represent Infinity.

Parameters:
infinity - The AbstractScalar as Infinity.

getFlowTo

public Flow<V,A> getFlowTo(V destination)
Give the flow from source to destination.

Parameters:
destination - The destination of the computed flow.
Returns:
The extracted flow from source to destination.


Copyright © 2009 INRIA (Projet Mascotte). All Rights Reserved.