#include void MatrixVectorMult(double out[], double Val[], int Row[], int Col[], double d[], int m, int nnz) { int k; for (k = 0; k < m; k = k + 1) { out[k] = 0.0; } for (k = 0; k < nnz; k = k + 1) { // cout << "k = " << k << ", Col[k] = " << Col[k] // << ", d[Col[k]] = " << d[Col[k]] << endl; // cout << Val[k] << " * " << d[Col[k]] << endl; out[Row[k]] = out[Row[k]] + Val[k]*d[Col[k]]; } }