Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / directed-graph / shortest-path-check.sig
1 (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8 signature SHORTEST_PATH_CHECK_STRUCTS =
9 sig
10 include DIRECTED_GRAPH
11 structure Weight: WEIGHT
12 end
13
14 signature SHORTEST_PATH_CHECK =
15 sig
16 include SHORTEST_PATH_CHECK_STRUCTS
17
18 structure Answer:
19 sig
20 datatype t =
21 Shortest
22 | SourceNonZero
23 | PredecessorReachable of Node.t * Edge.t
24 | Relaxable of Node.t * Edge.t
25 | NoPath of Node.t
26
27 val layout: t * (Node.t -> Layout.t) -> Layout.t
28 end
29
30 val check: {graph: t,
31 source: Node.t,
32 weight: Edge.t -> Weight.t,
33 distance: Node.t -> Weight.t option}
34 -> Answer.t
35 end