~ubuntu-branches/ubuntu/oneiric/menhir/oneiric

« back to all changes in this revision

Viewing changes to src/infiniteArray.mli

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-02-22 23:41:17 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090222234117-yxk115kvzv634utx
Tags: 20090204.dfsg-2
* New binary package libmenhir-ocaml-dev, Closes: #516134.
* Use dh-ocaml predefined variables.
* Use predefined variable OCAML_BEST (dh-ocaml >= 0.4).
* debian/svn-deblayout: remove no longer needed SVN setting

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(**************************************************************************)
 
2
(*                                                                        *)
 
3
(*  Menhir                                                                *)
 
4
(*                                                                        *)
 
5
(*  Fran�ois Pottier, INRIA Rocquencourt                                  *)
 
6
(*  Yann R�gis-Gianas, PPS, Universit� Paris Diderot                      *)
 
7
(*                                                                        *)
 
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.               *)
 
12
(*                                                                        *)
 
13
(**************************************************************************)
 
14
 
 
15
(* $Id: infiniteArray.mli,v 1.5 2007/09/10 21:09:37 fpottier Exp $ *)
 
16
 
 
17
(** This module implements infinite arrays. **)
 
18
type 'a t
 
19
 
 
20
(** [make x] creates an infinite array, where every slot contains [x]. **)
 
21
val make: 'a -> 'a t
 
22
 
 
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
 
26
 
 
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
 
30
 
 
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
 
34
    the default value. *)
 
35
val extent: 'a t -> int
 
36
 
 
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