For the final exam, I’ve added a matrix API. The students are supposed to have implemented this, but we know that haven’t, so this way they can either use their version or mine.
Matrix API (Edit: The most up to date Matrix API can be found here):
(make-matrix i j)- create a new matrix withirows andjcolumns(matrix-rows m)- determine the number of rows in a matrix(matrix-cols m)- determine the number of columns in a matrix(matrix-ref m i j)- get the value at rowiand columnjof a matrixm(matrix-set! m i j v)- set the value stored in the matrix at rowiand columnjof matrixmto a new valuev(matrix-generator i j proc)- generate anixjmatrix by calling the functionprocof the form(i j -> value)at each rowiand columnjin the matrix
It’s very similar to the image API and that’s by design. It should be easy enough to convert from one to the other if need be.
1.346.23 is the newest version (and has the matrix API included).