Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /smlnj-lib/trunk/Util/array2-sig.sml
ViewVC logotype

Annotation of /smlnj-lib/trunk/Util/array2-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2144 - (view) (download)

1 : monnier 2 (* array2-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1993 by AT&T Bell Laboratories. See COPYRIGHT file for details.
4 :     *
5 :     * Two-dimensional arrays.
6 :     *)
7 :    
8 :     signature ARRAY2 =
9 :     sig
10 :     type 'a array2
11 :    
12 :     val array : (int * int * 'a) -> 'a array2
13 :     (* array(n,m,x) creates an n*m array initialized to x.
14 :     * Raises Size, if m or n is < 0.
15 :     *)
16 :     val tabulate : (int * int * ((int * int) -> 'a)) -> 'a array2
17 :     (* tabulate(n,m,f) creates an n*m array, where the (i,j) element
18 :     * is initialized to f(i,j). Raises Size, if m or n is < 0.
19 :     *)
20 :     val sub : ('a array2 * int * int) -> 'a
21 :     (* sub(a,i,j) returns the (i,j) element. Raises Subscript if i or j
22 :     * is out of range.
23 :     *)
24 :     val update : ('a array2 * int * int * 'a) -> unit
25 :     (* update(a,i,j,x) sets the (i,j) element to x. Raises Subscript if
26 :     * i or j is out of range.
27 :     *)
28 :     val dimensions : 'a array2 -> (int * int)
29 :     (* return the size of the array *)
30 :     val row : ('a array2 * int) -> 'a Array.array
31 :     (* project a row of the array. *)
32 :     val column : ('a array2 * int) -> 'a Array.array
33 :     (* project a column of the array. *)
34 :    
35 :     end (* ARRAY2 *)
36 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0