* Prints matrix blocks to std output stream out for debugging. This version makes use of the * Boost matrix library output of matrices as opposed to the printClean method below which * explicitly prints the matrix elements for more control over the format. * * @param outstream output stream */
| 237 | * @param outstream output stream |
| 238 | */ |
| 239 | void SparseBlockColumnMatrix::print(std::ostream& outstream) { |
| 240 | if ( size() == 0 ) { |
| 241 | outstream << "Empty SparseBlockColumnMatrix..." << std::endl; |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | outstream << "Printing SparseBlockColumnMatrix..." << std::endl; |
| 246 | QMapIterator<int, LinearAlgebra::Matrix *> it(*this); |
| 247 | while ( it.hasNext() ) { |
| 248 | it.next(); |
| 249 | |
| 250 | if( it.value() ) |
| 251 | outstream << it.key() << std::endl << *(it.value()) << std::endl |
| 252 | << std::endl; |
| 253 | else |
| 254 | outstream << "NULL block pointer at row[" << IString(it.key()) |
| 255 | << "]!" << std::endl; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | |
| 260 | /** |