(* * graph.sml - Graph Concepts *) (* Copyright 2003, Trustees of Indiana University * Please see the license in the file ../LICENSE *) (* $Id: graph.sml,v 1.2 2003/05/02 20:03:38 jewillco Exp $ *) signature GraphSig = sig type graph_t eqtype vertex_t end signature EdgeGraphSig = sig include GraphSig type edge_t val source : graph_t -> edge_t -> vertex_t val target : graph_t -> edge_t -> vertex_t end signature IncidenceGraphSig = sig include EdgeGraphSig val out_edges : graph_t -> vertex_t -> edge_t list end signature BidirectionalGraphSig = sig include IncidenceGraphSig val in_edges : graph_t -> vertex_t -> edge_t list end signature AdjacencyGraphSig = sig include GraphSig val adjacent_vertices : graph_t -> vertex_t -> vertex_t list end signature VertexListGraphSig = sig include GraphSig val vertices : graph_t -> vertex_t list val num_vertices : graph_t -> int end signature EdgeListGraphSig = sig include EdgeGraphSig val edges : graph_t -> edge_t list end