PreviousUpNext

15.3.321  src/lib/graph/maximum-flow.api

# maximum-flow.api
#
# Api of max flow computation
#
#               -- Allen Leung

# Compiled by:
#     src/lib/graph/graphs.lib

stipulate
    package odg =  oop_digraph;                                                         # oop_digraph   is from   src/lib/graph/oop-digraph.pkg
herein

    api Maximum_Flow {
        #
        package num:  Abelian_Group;                                                    # Abelian_Group         is from   src/lib/graph/group.api

        max_flow:           { graph:     odg::Digraph (N,E,G),                          # Here N,E,G stand stead for the types of client-package-supplied records associated with (respectively) nodes, edges and graphs.
                                 s:         odg::Node_Id,
                                 t:         odg::Node_Id,
                                 capacity:  odg::Edge(E) -> num::Element,
                                 flows:     (odg::Edge(E), num::Element) -> Void
                            }
                            -> num::Element;

        min_cost_max_flow:  { graph:    odg::Digraph (N,E,G),
                              s:         odg::Node_Id,
                              t:         odg::Node_Id,
                              capacity:  odg::Edge(E) -> num::Element,
                              cost:      odg::Edge(E) -> num::Element,
                              flows:     (odg::Edge(E), num::Element) -> Void
                            }
                            -> num::Element;
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext