## typelocked-matrix.api
# Compiled by:
#
src/lib/std/src/standard-core.sublib# There do not appear to be any implementations of this API at present.
# Before implementing, this api should be rationalized to match
#
src/lib/std/src/rw-matrix.api# which has evolved away from us.
### "We are faced with the paradoxical fact that education has become
### one of the chief obstacles to intelligence and freedom of thought."
###
### -- Bertrand Russell
api Typelocked_Matrix {
eqtype Matrix;
Vector;
Element;
Region = {
base: Matrix,
row: Int, col: Int,
nrows: Null_Or( Int ), ncols: Null_Or( Int )
};
from_rw_vector: (Int, Int, Element) -> Matrix;
from_list: List( List( Element ) ) -> Matrix;
from_fn: (Int, Int, ((Int, Int) -> Element)) -> Matrix;
get: (Matrix, Int, Int) -> Element;
set: (Matrix, Int, Int, Element) -> Void;
dimensions: Matrix -> (Int, Int);
columns: Matrix -> Int;
rows: Matrix -> Int;
row: (Matrix, Int) -> Vector;
column: (Matrix, Int) -> Vector;
copy: { src: Region,
dst: Matrix,
dst_row: Int,
dst_col: Int
}
-> Void;
keyed_apply: (((Int, Int, Element)) -> Void) -> Region -> Void;
apply: (Element -> Void) -> Matrix -> Void;
keyed_map_in_place: ((Int, Int, Element) -> Element) -> Region -> Void;
map_in_place: (Element -> Element) -> Matrix -> Void;
foldi: ((Int, Int, Element, X) -> X) -> X -> Region -> X;
fold: ((Element, X) -> X) -> X -> Matrix -> X;
};
## COPYRIGHT (c) 1997 AT&T Research.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.