Skip to content
Snippets Groups Projects
Commit 3b339d0f authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Use NaNHelper for CRSMatrix output

parent 64f906b9
No related branches found
No related tags found
1 merge request!105Add NaNHelper utility
#ifndef CRS_MATRIX_HPP #ifndef CRS_MATRIX_HPP
#define CRS_MATRIX_HPP #define CRS_MATRIX_HPP
#include <algebra/Vector.hpp>
#include <utils/Array.hpp> #include <utils/Array.hpp>
#include <utils/NaNHelper.hpp>
#include <utils/PugsAssert.hpp> #include <utils/PugsAssert.hpp>
#include <algebra/Vector.hpp>
#include <iostream> #include <iostream>
template <typename DataType, typename IndexType> template <typename DataType, typename IndexType>
...@@ -100,7 +100,7 @@ class CRSMatrix ...@@ -100,7 +100,7 @@ class CRSMatrix
const auto row_end = A.m_row_map[i + 1]; const auto row_end = A.m_row_map[i + 1];
os << i << "|"; os << i << "|";
for (IndexType j = row_begin; j < row_end; ++j) { for (IndexType j = row_begin; j < row_end; ++j) {
os << ' ' << A.m_column_indices[j] << ':' << A.m_values[j]; os << ' ' << A.m_column_indices[j] << ':' << NaNHelper(A.m_values[j]);
} }
os << '\n'; os << '\n';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment