-- Matrix.mesa
--  last edit  March 2, 1983 4:41 pm  Sturgis

--DIRECTORY
  

Matrix: DEFINITIONS =

BEGIN

Matrix: TYPE = REF MatrixBody;
MatrixElement: TYPE = REF ANY;
MatrixBody: TYPE;

CreateMatrix: PROCEDURE RETURNS[Matrix];

-- columns (rows) are numbered in [1..N], where N is the number of columns (rows)

AddColumnAt: PROCEDURE[m: Matrix, x: CARDINAL]; -- the new column will be number x
AddRowAt: PROCEDURE[m: Matrix, y: CARDINAL]; -- the new row will be number x
DeleteColumnAt: PROCEDURE[m: Matrix, x: CARDINAL];
DeleteRowAt: PROCEDURE[m: Matrix, y: CARDINAL];
SetElementAt: PROCEDURE[m: Matrix, x, y: CARDINAL, e: MatrixElement];
GetElementAt: PROCEDURE[m: Matrix, x, y: CARDINAL] RETURNS[MatrixElement];
SetRowInfoAt: PROCEDURE[m: Matrix, y: CARDINAL, e: MatrixElement];
SetColumnInfoAt: PROCEDURE[m: Matrix, x: CARDINAL, e: MatrixElement];
GetRowInfoAt: PROCEDURE[m: Matrix, y: CARDINAL] RETURNS[MatrixElement];
GetColumnInfoAt: PROCEDURE[m: Matrix, x: CARDINAL] RETURNS[MatrixElement];

OutOfBounds: ERROR;


END..

--  5-Feb-82 14:08:32: Sturgis, started Matrix.mesa
-- 14-Feb-82 18:59:10: added OutOfBounds.
-- 28-Feb-82 12:09:00: added row and column info to interface

-- March 2, 1983 4:41 pm: remove private definitions.