The Matrix class is a toolkit of matrix functions that is used by Mirage. They are accessed as Matrix::<function_name>(a, b, c) e.g. Matrix::mult(T1, T2, M);
// Apply a matrix M to a vector v and store the resulting
//vector in result.
static void apply(matrix m, vector v, vector result);
// Apply a matrix M to a vector v and store the resulting
// vector in x,y,z.
static void apply(matrix m, vector v, double *x, double *y,
double *z);
// Apply a matrix M to a vector v and store the resulting
// vector in result.
// This apply function doesn't use the shift coefficients
// (m[i][3]).
static void applynoshift(matrix m, vector v, vector result);
// Apply a matrix M to a vector v and store the resulting
// vector in x,y,z.
// This apply function doesn't use the shift coefficients
// (m[i][3]).
static void applynoshift(matrix m, vector v, double *x,
double *y, double *z);
// Apply the transpose of a matrix M to a vector v and store
// the resulting vector in result.
static void applytranspose(matrix m, vector v, vector result);
// Store a unit matrix in the given matrix M.
static void unit(matrix m);
// Assign values to a matrix.
static void assign(matrix m,
double a00, double a01, double a02, double a03,
double a10, double a11, double a12, double a13,
double a20, double a21, double a22, double a23);
// Set matrix a to matrix b.
static void set(matrix a, matrix b);
// Multiply matrix a by matrix b and store in result.
// A * B = R ... i.e. A is on the left, B on the right.
static void mult(matrix a, matrix b, matrix result);