/* * ===================================================================================== * * Filename: sparse_matrix_unit.cc * * Description: * * Version: 1.0 * Created: 06/22/2007 09:35:38 AM EDT * Revision: none * Compiler: gcc * * Author: Nikolaos Vasiloglou (NV), nvasil@ieee.org * Company: Georgia Tech Fastlab-ESP Lab * * ===================================================================================== */ #include "fastlib/fastlib.h" #include "base/test.h" #include "u/nvasil/sparse/sparse_matrix.h" namespace sparse { template class MatrixTest { public: void Init(){ size_=100; non_zero_=10; matrix_.Init(100, 10); for(index_t i=0; i(bfile_); T *x=ReadVectorFromFile(xfile_); T *xconjg=NewVector(size_); ConjugateGradient(matrix_, b, xconjg, tolerance_); for(index_t i=0; i matrix_; index_t size_; index_t non_zero_; string matrixfile_; string xfile_; string bfile_; T tolerance_; }; }; int main(int argc, char *argv[]) { sparse::MatrixTest matrix_test; matrix_test.TestAll(); }