Class MaximumFlowProblem.MaximumFlowProblemImpl<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:
    MaximumFlowProblem<V,​E>
    Enclosing interface:
    MaximumFlowProblem<V,​E>

    public static class MaximumFlowProblem.MaximumFlowProblemImpl<V,​E>
    extends java.lang.Object
    implements MaximumFlowProblem<V,​E>
    Default implementation of a Maximum Flow Problem.
    • Constructor Detail

      • MaximumFlowProblemImpl

        public MaximumFlowProblemImpl​(Graph<V,​E> graph,
                                      java.util.Set<V> sources,
                                      java.util.Set<V> sinks,
                                      java.util.function.Function<E,​java.lang.Double> capacities)
        Constructs a new maximum flow problem.
        Parameters:
        graph - flow network
        sources - set of network sources
        sinks - set of network sinks
        capacities - network capacity function
    • Method Detail

      • getGraph

        public Graph<V,​E> getGraph()
        Returns the network the problem is defined on.
        Specified by:
        getGraph in interface MaximumFlowProblem<V,​E>
        Returns:
        the network the problem is defined on.
      • getSources

        public java.util.Set<V> getSources()
        Returns the source set of this problem.
        Specified by:
        getSources in interface MaximumFlowProblem<V,​E>
        Returns:
        the source set of this problem.
      • getSinks

        public java.util.Set<V> getSinks()
        Returns the sink set of this problem.
        Specified by:
        getSinks in interface MaximumFlowProblem<V,​E>
        Returns:
        the sink set of this problem.
      • getCapacities

        public java.util.function.Function<E,​java.lang.Double> getCapacities()
        Returns the capacity function of this problem. This function is defined for all edges of the underlying network.
        Specified by:
        getCapacities in interface MaximumFlowProblem<V,​E>
        Returns:
        the capacity function of this problem.