Commit 9c9b06bc authored by andreadelprete's avatar andreadelprete
Browse files

[math-utils] Add function to check if matrix/vector contains NaN

parent bfc74536
......@@ -146,6 +146,12 @@ namespace tsid
return ( (x - x).array() == (x - x).array()).all();
}
template<typename Derived>
inline bool is_nan(const Eigen::MatrixBase<Derived>& x)
{
return ((x.array() == x.array())).all();
}
/**
* Write the specified matrix to a binary file with the specified name.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment