1 #ifndef VIENNACL_LINALG_DETAIL_AMG_AMG_DEBUG_HPP
2 #define VIENNACL_LINALG_DETAIL_AMG_AMG_DEBUG_HPP
31 #define VIENNACL_AMG_MATRIXTYPE boost::numeric::ublas::matrix<ScalarType>
33 #define VIENNACL_AMG_MATRIXTYPE MatrixType
45 #ifdef VIENNACL_AMG_DEBUG
46 template <
typename MatrixType>
47 void printmatrix(MatrixType & mat,
int const value=-1)
49 typedef typename MatrixType::value_type ScalarType;
50 typedef typename VIENNACL_AMG_MATRIXTYPE::iterator1 InternalRowIterator;
51 typedef typename VIENNACL_AMG_MATRIXTYPE::iterator2 InternalColIterator;
55 for (InternalRowIterator row_iter = mat2.begin1(); row_iter != mat2.end1(); ++row_iter)
57 for (InternalColIterator col_iter = row_iter.begin(); col_iter != row_iter.end(); ++col_iter)
59 std::cout << *col_iter <<
" ";
61 std::cout << std::endl;
63 std::cout << std::endl;
66 template <
typename VectorType>
69 for (
typename VectorType::const_iterator iter = vec.begin(); iter != vec.end(); ++iter)
71 std::cout << *iter <<
" ";
73 std::cout << std::endl;
76 template <
typename MatrixType>
79 template <
typename VectorType>
A reader and writer for the matrix market format is implemented here.
void printmatrix(MatrixType &, int)
Definition: amg_debug.hpp:77
#define VIENNACL_AMG_MATRIXTYPE
Definition: amg_debug.hpp:33
void printvector(VectorType const &)
Definition: amg_debug.hpp:80