Documentation of 'org.jgrapht.alg.flow.MaximumFlowAlgorithmBase' Java class
MaximumFlowAlgorithmBase
org.jgrapht.alg.flow

Class MaximumFlowAlgorithmBase<V,E>

    • Field Detail

      • DEFAULT_EPSILON

        public static final double DEFAULT_EPSILON
        Default tolerance.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MaximumFlowAlgorithmBase

        public MaximumFlowAlgorithmBase(Graph<V,E> network,
                                        double epsilon)
        Construct a new maximum flow
        Parameters:
        network - the network
        epsilon - the tolerance for the comparison of floating point values
    • Method Detail

      • getCurrentSource

        public V getCurrentSource()
        Returns current source vertex, or null if there was no calculateMaximumFlow calls.
        Returns:
        current source
      • getCurrentSink

        public V getCurrentSink()
        Returns current sink vertex, or null if there was no calculateMaximumFlow calls.
        Returns:
        current sink
      • getMaximumFlowValue

        public double getMaximumFlowValue()
        Returns maximum flow value, that was calculated during last calculateMaximumFlow call.
        Specified by:
        getMaximumFlowValue in interface MaximumFlowAlgorithm<V,E>
        Returns:
        maximum flow value
      • getFlowMap

        public java.util.Map<E,java.lang.Double> getFlowMap()
        Returns maximum flow, that was calculated during last calculateMaximumFlow call, or null, if there was no calculateMaximumFlow calls.
        Specified by:
        getFlowMap in interface MaximumFlowAlgorithm<V,E>
        Returns:
        read-only mapping from edges to doubles - flow values
      • getFlowDirection

        public V getFlowDirection(E e)
        Returns the direction of the flow on an edge (u,v). In case (u,v) is a directed edge (arc), this function will always return the edge target v. However, if (u,v) is an edge in an undirected graph, flow may go through the edge in either side. If the flow goes from u to v, we return v, otherwise u. If the flow on an edge equals 0, the returned value has no meaning.
        Specified by:
        getFlowDirection in interface MaximumFlowAlgorithm<V,E>
        Parameters:
        e - edge
        Returns:
        the vertex where the flow leaves the edge
      • getCutEdges

        public java.util.Set<E> getCutEdges()
        Description copied from interface: MinimumSTCutAlgorithm
        Returns the set of edges which run from S to T, in the s-t cut obtained after the last invocation of MinimumSTCutAlgorithm.calculateMinCut(Object, Object) In case of a directed graph, only the edges with their tail in S and their head in T are returned. In cased of a undirected graph, all edges with one endpoint in S and one endpoint in T are returned.
        Specified by:
        getCutEdges in interface MinimumSTCutAlgorithm<V,E>
        Returns:
        set of edges which run from S to T

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.