diff --git a/nonclass.h b/nonclass.h index 00c5cda..3e7c89e 100644 --- a/nonclass.h +++ b/nonclass.h @@ -233,4 +233,26 @@ return cblas_ddot(n,x,incx,y,incy); } + +//debugging aid: reconstruct an explicit matrix from the implicit version +//which provides gemv only +template +NRMat reconstructmatrix(const M &implicitmat) +{ +NRMat r(implicitmat.nrows(),implicitmat.ncols()); +NRVec rhs(0.,implicitmat.ncols()); +NRVec tmp(implicitmat.nrows()); +for(int i=0; i