update documentation

This commit is contained in:
Simon Cruanes 2015-06-11 11:35:31 +02:00
parent 3b27a5a8cd
commit 79d57f9be7
2 changed files with 13 additions and 2 deletions

View file

@ -693,7 +693,7 @@ module Map(O : Map.OrderedType) = struct
let union m1 m2 = let union m1 m2 =
M.merge M.merge
(fun v s1 s2 -> match s1, s2 with (fun _ s1 s2 -> match s1, s2 with
| Some s, None | Some s, None
| None, Some s -> Some s | None, Some s -> Some s
| None, None -> assert false | None, None -> assert false

View file

@ -26,6 +26,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(** {1 Simple Graph Interface} (** {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 *) @since NEXT_RELEASE *)
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit
@ -68,7 +79,7 @@ type 'v tag_set = {
(** Mutable table with keys ['k] and values ['a] *) (** Mutable table with keys ['k] and values ['a] *)
type ('k, 'a) table = { type ('k, 'a) table = {
mem: 'k -> bool; 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 *) add: 'k -> 'a -> unit; (** Erases previous binding *)
} }