1
(**************************************************************************)
5
(* Fran�ois Pottier, INRIA Rocquencourt *)
6
(* Yann R�gis-Gianas, PPS, Universit� Paris Diderot *)
8
(* Copyright 2005-2008 Institut National de Recherche en Informatique *)
9
(* et en Automatique. All rights reserved. This file is distributed *)
10
(* under the terms of the GNU Library General Public License, with the *)
11
(* special exception on linking described in file LICENSE. *)
13
(**************************************************************************)
15
(* $Id: infiniteArray.mli,v 1.5 2007/09/10 21:09:37 fpottier Exp $ *)
17
(** This module implements infinite arrays. **)
20
(** [make x] creates an infinite array, where every slot contains [x]. **)
23
(** [get a i] returns the element contained at offset [i] in the array [a].
24
Slots are numbered 0 and up. **)
25
val get: 'a t -> int -> 'a
27
(** [set a i x] sets the element contained at offset [i] in the array
28
[a] to [x]. Slots are numbered 0 and up. **)
29
val set: 'a t -> int -> 'a -> unit
31
(** [extent a] is the length of an initial segment of the array [a]
32
that is sufficiently large to contain all [set] operations ever
33
performed. In other words, all elements beyond that segment have
35
val extent: 'a t -> int
37
(** [domain a] is a fresh copy of an initial segment of the array [a]
38
whose length is [extent a]. *)
39
val domain: 'a t -> 'a array