#include #include #define MAX_FILE_LEN 80 #define MAX_VEC_SIZE 80 #define MAX_MAT_SIZE 80 #define TOLERANCE 10.0 /* structures */ typedef struct { int n; float *p;} Vector; typedef struct {int n; int m; float *p;} Matrix; /* Conjugate gradient function */ // Vector * cg(Matrix *A, Vector *b, float tol, int imax); /* Matrix and Vector I/O functions */ int mcreator(Matrix *); Vector * vcreator(void); void mreader(Matrix *); void vreader(Vector *); void mdestroy(Matrix *); void vdestroy(Vector *);