/usr/lib/ocaml/ocamlgraph/nonnegative.mli is in libocamlgraph-ocaml-dev 1.8.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | (**************************************************************************)
(* *)
(* Ocamlgraph: a generic graph library for OCaml *)
(* Copyright (C) 2004-2010 *)
(* Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles *)
(* *)
(* This software is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Library General Public *)
(* License version 2.1, with the special exception on linking *)
(* described in file LICENSE. *)
(* *)
(* This software is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *)
(* *)
(**************************************************************************)
(* This module is a contribution of Yuto Takei *)
open Sig
open Blocks
open Persistent
(** Weighted graphs without negative-cycles. *)
(** This graph maintains the invariant that it is free of such cycles that
the total length of edges involving is negative. With introduction of
those negative-cycles causes an inability to compute the shortest paths
from arbitrary vertex. By using the graph modules defined here,
introduction of such a cycle is automatically prevented. *)
(** Signature for edges' weights. *)
module type WEIGHT = sig
type label
(** Type for labels of graph edges. *)
type t
(** Type of edges' weights. *)
val weight : label -> t
(** Get the weight of an edge. *)
val compare : t -> t -> int
(** Weights must be ordered. *)
val add : t -> t -> t
(** Addition of weights. *)
val zero : t
(** Neutral element for {!add}. *)
end
module Imperative
(G: Sig.IM)
(W: WEIGHT with type label = G.E.label) : sig
include Sig.IM with module V = G.V and module E = G.E
exception Negative_cycle of G.E.t list
end
(** Persistent graphs with negative-cycle prevention *)
module Persistent
(G: Sig.P)
(W: WEIGHT with type label = G.E.label) : sig
include Sig.P with module V = G.V and module E = G.E
exception Negative_cycle of G.E.t list
(** Exception [NegativeCycle] is raised whenever a negative cycle
is introduced for the first time (either with [add_edge]
or [add_edge_e]) *)
end
|