Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <limits.h>
- typedef struct matrix *Mat; // ADT: so it gets a capital letter to start.
- Mat MatConstruct(void); // Allocates memory and initializes a Mat.
- void MatDestruct(Mat mat); // Zeros all data and frees memory.
- void MatPrint(Mat mat); // Prints a matrix on the console.
- void MatInit(Mat mat,size_t mrows,size_t ncols); // Callocs a mxn array as a double *, sets dimensions.
- size_t MatGetRows(Mat mat); // Gets the number of rows.
- size_t MatGetCols(Mat mat); // Gets the nubmer of columns.
- double *MatGetArr(Mat mat); // Returns a double * of size rows*columns.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement