* i.e. one nonzero entry of the
* matrix per line.
*/
- void print (std::ostream &out) const;
+ template <class STREAM>
+ void print (STREAM &out) const;
/**
* Print the matrix in the usual
+template <typename number>
+template <class STREAM>
+inline
+void SparseMatrix<number>::print (STREAM &out) const
+{
+ Assert (cols != 0, ExcNotInitialized());
+ Assert (val != 0, ExcNotInitialized());
+
+ for (unsigned int i=0; i<cols->rows; ++i)
+ for (unsigned int j=cols->rowstart[i]; j<cols->rowstart[i+1]; ++j)
+ out << "(" << i << "," << cols->colnums[j] << ") " << val[j] << std::endl;
+}
+
+
template <typename number>
inline
void
-template <typename number>
-void SparseMatrix<number>::print (std::ostream &out) const
-{
- Assert (cols != 0, ExcNotInitialized());
- Assert (val != 0, ExcNotInitialized());
-
- for (unsigned int i=0; i<cols->rows; ++i)
- for (unsigned int j=cols->rowstart[i]; j<cols->rowstart[i+1]; ++j)
- out << "(" << i << "," << cols->colnums[j] << ") " << val[j] << std::endl;
-
- AssertThrow (out, ExcIO());
-}
-
-
template <typename number>
void SparseMatrix<number>::print_formatted (std::ostream &out,
const unsigned int precision,