PreviousUpNext

15.3.328  src/lib/graph/spanning-tree.api

#
# Api for the minimal cost spanning tree problem.
# All spanning tree edges are folded together with a user supplied
# function.

# -- Allen Leung

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

###                "He was born with a gift of laughter
###                 and a sense that the world was mad."
###
###                                -- Rafael Sabatini



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

    api Minimal_Cost_Spanning_Tree {
        #
        exception UNCONNECTED;

        spanning_tree:  {  weight:     odg::Edge(E) -> W,
                           lt:         (W, W) -> Bool
                        }
                        -> 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.
                        -> ((odg::Edge(E), X) -> X) -> X -> X;
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext