/* matrix.h  (Steve Hill)  1.1  3/9/90$ */

/* MATRIX.H
 *
 * Header file for matrix operations.
 */

typedef struct matrix_s
{
	int	rows, cols;
	real_t	**matrix;
}
matrix_t;

#define MatrixNull	((matrix_t *) NULL)

matrix_t	*MatrixZero PROTO((matrix_t *)),
		*Matrix PROTO((int, int, real_t *)),
		*MatrixLet PROTO((matrix_t *, matrix_t *)),
		*MatrixCopy PROTO((matrix_t *)),
		*MatrixScale PROTO((matrix_t *, matrix_t *, real_t)),
		*MatrixSet PROTO((matrix_t *, int, int, real_t)),
		*MatrixId PROTO((int)),
		*MatrixAdd PROTO((matrix_t *, matrix_t *, matrix_t *)),
		*MatrixSub PROTO((matrix_t *, matrix_t *, matrix_t *)),
		*MatrixMul PROTO((matrix_t *, matrix_t *, matrix_t *)),
		*MatrixTranspose PROTO((matrix_t *, matrix_t *));

real_t		MatrixGet PROTO((matrix_t *, int, int));

void		MatrixPrint PROTO((FILE *, matrix_t *)),
		PrintMatrix PROTO((FILE *, int, matrix_t *)),
		MatrixFree PROTO((matrix_t *));
