// header file of cg.cpp // for cgtst1.ccp without dynamic alloations. /* ----------------------- DECLARATIONS cg.h ------------------------ */ #define SIZE 25 /* maximum size of system ...............*/ #define REAL double /* real numbers (here double) ...........*/ typedef REAL MAT[SIZE][SIZE]; /* square matrix type */ typedef REAL VEC[SIZE]; /* vector type */ int cg_method /* Conjugate Gradient Method ............*/ ( int n, /* Size of the linear system ............*/ MAT a, /* System matrix ........................*/ VEC y, /* right hand side ......................*/ VEC x /* solution vector ......................*/ ); /* Error code ...........................*/ /* ---------------------------- END cg.h ---------------------------- */