Skip to content
Snippets Groups Projects

Add NaNHelper utility

Merged Stéphane Del Pino requested to merge feature/nan-output-for-vectors-and-matrices into develop
2 files
+ 13
8
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 1
8
@@ -2,7 +2,6 @@
#define VECTOR_HPP
#include <utils/Array.hpp>
#include <utils/NaNHelper.hpp>
#include <utils/PugsAssert.hpp>
#include <utils/PugsMacros.hpp>
#include <utils/PugsUtils.hpp>
@@ -29,13 +28,7 @@ class Vector // LCOV_EXCL_LINE
friend std::ostream&
operator<<(std::ostream& os, const Vector& x)
{
if (x.size() > 0) {
os << 0 << ':' << NaNHelper(x[0]);
}
for (size_t i = 1; i < x.size(); ++i) {
os << ' ' << i << ':' << NaNHelper(x[i]);
}
return os;
return os << x.m_values;
}
friend Vector<std::remove_const_t<DataType>>
Loading