TestAMatrix.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created: Sindhu July 27, 1987 2:00:51 pm PDT
Pradeep Sindhu January 25, 1988 3:10:48 pm PST
Tests Incidence matrices.
DIRECTORY
AMatrix;
TestAMatrix: CEDAR PROGRAM
IMPORTS AMatrix
~ BEGIN OPEN AMatrix;
am: AM;
amSeq: AMSeq;
Test: PROC [] = {
am ← Create[4];
am[0][0] ← 0; am[0][1] ← 1; am[0][2] ← 1; am[0][3] ← 0;
am[1][0] ← 0; am[1][1] ← 0; am[1][2] ← 0; am[1][3] ← 1;
am[2][0] ← 0; am[2][1] ← 0; am[2][2] ← 0; am[2][3] ← 1;
am[3][0] ← 1; am[3][1] ← 0; am[3][2] ← 0; am[3][3] ← 0;
amSeq ← CreateAMSeq[am];
UpdateAMSeq[amSeq, 0];
UpdateAMSeq[amSeq, 1];
UpdateAMSeq[amSeq, 3];
UpdateAMSeq[amSeq, 0];
UpdateAMSeq[amSeq, 1];
UpdateAMSeq[amSeq, 3];
UpdateAMSeq[amSeq, 0];
UpdateAMSeq[amSeq, 1];
ERROR
};
END.