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

SCM Repository

[smlnj] View of /sml/branches/FLINT/src/compiler/PervEnv/Basis/array2.sig
ViewVC logotype

View of /sml/branches/FLINT/src/compiler/PervEnv/Basis/array2.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 245 - (download) (as text) (annotate)
Sat Apr 17 18:47:12 1999 UTC (20 years, 7 months ago) by monnier
File size: 1309 byte(s)
version 110.16
(* array2.sig
 *
 * COPYRIGHT (c) 1997 AT&T Research.
 *)

signature ARRAY2 =
  sig

    eqtype 'a array
    type 'a region = {
	base : 'a array,
	row : int, col : int,
	nrows : int option, ncols : int option
      }
    datatype traversal = RowMajor | ColMajor

    val array : (int * int * 'a) -> 'a array
    val fromList : 'a list list -> 'a array
    val tabulate : traversal -> (int * int * ((int * int) -> 'a)) -> 'a array
    val sub : ('a array * int * int) -> 'a
    val update : ('a array * int * int * 'a) -> unit
    val dimensions : 'a array -> (int * int)
    val nCols : 'a array -> int
    val nRows : 'a array -> int
    val row : ('a array * int) -> 'a Vector.vector
    val column : ('a array * int) -> 'a Vector.vector
    val copy : {
	    src : 'a region, dst : 'a array, dst_row : int, dst_col : int
	  } -> unit

    val appi    : traversal -> ((int * int * 'a) -> unit) -> 'a region -> unit
    val app     : traversal -> ('a -> unit) -> 'a array -> unit
    val modifyi : traversal -> ((int * int * 'a) -> 'a) -> 'a region -> unit
    val modify  : traversal -> ('a -> 'a) -> 'a array -> unit
    val foldi   : traversal -> ((int * int * 'a * 'b) -> 'b) -> 'b
		    -> 'a region -> 'b
    val fold    : traversal -> (('a * 'b) -> 'b) -> 'b -> 'a array -> 'b

  end

(*
 * $Log$
 *)

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