d6c0ebb884728d50872bc0890b0ccce1444def49
[tatoo.git] / src / utils / cache.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 (*
17   Time-stamp: <Last modified on 2013-03-13 18:04:35 CET by Kim Nguyen>
18 *)
19
20 (** N-dimentional caches *)
21
22 module N1 :
23 sig
24
25   type 'a t
26   val create : int -> 'a -> 'a t
27   val find : 'a t -> int -> 'a
28   val add : 'a t -> int -> 'a -> unit
29   val dummy : 'a t -> 'a
30   val iteri : (int -> 'a -> bool -> unit) -> 'a t -> unit
31 end
32
33 module N2:
34 sig
35     type 'a t
36     val create : int -> 'a -> 'a t
37     val find : 'a t -> int -> int -> 'a
38     val add : 'a t -> int -> int -> 'a -> unit
39     val dummy : 'a t -> 'a
40     val iteri : (int -> int -> 'a -> bool -> unit) -> 'a t -> unit
41 end
42
43 module N3 :
44   sig
45     type 'a t
46     val create : int -> 'a -> 'a t
47     val find : 'a t -> int -> int -> int -> 'a
48     val add : 'a t -> int -> int -> int -> 'a -> unit
49     val dummy : 'a t -> 'a
50     val iteri : (int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
51   end
52
53 module N4 :
54   sig
55     type 'a t
56     val create : int -> 'a -> 'a t
57     val find : 'a t -> int -> int -> int -> int -> 'a
58     val add : 'a t -> int -> int -> int -> int -> 'a -> unit
59     val dummy : 'a t -> 'a
60     val iteri : (int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
61   end
62
63 module N5 :
64   sig
65     type 'a t
66     val create : int -> 'a -> 'a t
67     val find : 'a t -> int -> int -> int -> int -> int -> 'a
68     val add : 'a t -> int -> int -> int -> int -> int -> 'a -> unit
69     val dummy : 'a t -> 'a
70     val iteri : (int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
71   end
72
73 module N6 :
74   sig
75     type 'a t
76     val create : int -> 'a -> 'a t
77     val find : 'a t -> int -> int -> int -> int -> int -> int -> 'a
78     val add : 'a t -> int -> int -> int -> int -> int -> int -> 'a -> unit
79     val dummy : 'a t -> 'a
80     val iteri : (int -> int -> int -> int -> int -> int -> 'a -> bool -> unit) -> 'a t -> unit
81   end