From 79d57f9be712a637633fc728040967c4485f966a Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 11 Jun 2015 11:35:31 +0200 Subject: [PATCH] update documentation --- src/data/CCGraph.ml | 2 +- src/data/CCGraph.mli | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/data/CCGraph.ml b/src/data/CCGraph.ml index 3ea91241..e5ddb97e 100644 --- a/src/data/CCGraph.ml +++ b/src/data/CCGraph.ml @@ -693,7 +693,7 @@ module Map(O : Map.OrderedType) = struct let union m1 m2 = M.merge - (fun v s1 s2 -> match s1, s2 with + (fun _ s1 s2 -> match s1, s2 with | Some s, None | None, Some s -> Some s | None, None -> assert false diff --git a/src/data/CCGraph.mli b/src/data/CCGraph.mli index bfb40002..b543c8f7 100644 --- a/src/data/CCGraph.mli +++ b/src/data/CCGraph.mli @@ -26,6 +26,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {1 Simple Graph Interface} + A collections of algorithms on (mostly read-only) graph structures. + The user provides her own graph structure as a [('v, 'e) CCGraph.t], + where ['v] is the type of vertices and ['e] the type of edges + (for instance, ['e = ('v * 'v)] is perfectly fine in many cases). + + Such a [('v, 'e) CCGraph.t] structure is a record containing + three functions: two relate edges to their origin and destination, + and one maps vertices to their outgoing edges. + This abstract notion of graph makes it possible to run the algorithms + on any user-specific type that happens to have a graph structure. + @since NEXT_RELEASE *) type 'a sequence = ('a -> unit) -> unit @@ -68,7 +79,7 @@ type 'v tag_set = { (** Mutable table with keys ['k] and values ['a] *) type ('k, 'a) table = { mem: 'k -> bool; - find: 'k -> 'a; (** @raise Not_found *) + find: 'k -> 'a; (** @raise Not_found if element not added before *) add: 'k -> 'a -> unit; (** Erases previous binding *) }