fr.inria.opengve.bridge.interfaces
Interface Flow<V,A extends Arc<V>>


public interface Flow<V,A extends Arc<V>>

This interface is used to manage flow. This flow is simplest one, one source and one destination

Author:
fabrice.peix@sophia.inria.fr

Method Summary
 java.util.Iterator<A> edgeWithFlowIterator()
          Give an iterator on all edge of this flows.
 V getDestination()
          Give the destination of this flow.
 AbstractScalar getFlow(A e)
          Give the quantity of flow associated with an edge.
 AbstractScalar getIncomingFlow(V v)
          Return the quantity of flow incoming to vertex v.
 AbstractScalar getOutgoingFlow(V v)
          Return the quantity of flow outgoing from vertex v.
 V getSource()
          Give the source of this flow.
 Graph<V,A> getUnderlyingGraph()
          Give the underlying graph associated with this flow.
 void setFlow(A e, AbstractScalar value)
          Set the quantity of flow associated to an edge.
 void setFlow(V source, V destination, AbstractScalar value)
          Set source, destination and value of this flow.
 boolean verify()
          Verify the coherence of the flow.
 

Method Detail

setFlow

void setFlow(V source,
             V destination,
             AbstractScalar value)
Set source, destination and value of this flow.

Parameters:
source - The source.
destination - The destination.
value - The value of flow.

getSource

V getSource()
Give the source of this flow.

Returns:
The source of this flow or null if not define.

getDestination

V getDestination()
Give the destination of this flow.

Returns:
The destination of this flow or null if not define.

getIncomingFlow

AbstractScalar getIncomingFlow(V v)
Return the quantity of flow incoming to vertex v.

Parameters:
v - The vertex.
Returns:
A value representing the quantity of flow entering from v.

getOutgoingFlow

AbstractScalar getOutgoingFlow(V v)
Return the quantity of flow outgoing from vertex v.

Parameters:
v - The vertex.
Returns:
A value representing the quantity of flow outgoing from v.

setFlow

void setFlow(A e,
             AbstractScalar value)
Set the quantity of flow associated to an edge.

Parameters:
e - The edge.
value - The quantity of flow associated to the edge e.

getFlow

AbstractScalar getFlow(A e)
Give the quantity of flow associated with an edge.

Parameters:
e - The edge.
Returns:
The quantity of flow associated with the edge e.

edgeWithFlowIterator

java.util.Iterator<A> edgeWithFlowIterator()
Give an iterator on all edge of this flows.

Returns:
The iterator.

getUnderlyingGraph

Graph<V,A> getUnderlyingGraph()
Give the underlying graph associated with this flow.

Returns:
The supporting graph associated with this flow.

verify

boolean verify()
Verify the coherence of the flow. The exact implementation of this method is not define, each implementatiom of Flow must define exactly what this method do.

Returns:
true if this flow is coherent with verifications and false otherwise.


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