The MaRC::Matrix and MaRC::Vector equality operator, i.e. operator==() for both classes does not correctly support floating point types. They both default to the trivial exact check for equality between each matrix/vector element, instead of checking if the value of each floating point element is almost equal. Rather than use std::equal_to(), MaRC::almost_equal() and MaRC::almost_zero() should be use for floating point typed matrices and vectors. Overloads of the latter two for MaRC::Matrix and MaRC::Vector would be appropriate.
The
MaRC::Matrix
andMaRC::Vector
equality operator, i.e.operator==()
for both classes does not correctly support floating point types. They both default to the trivial exact check for equality between each matrix/vector element, instead of checking if the value of each floating point element is almost equal. Rather than usestd::equal_to()
,MaRC::almost_equal()
andMaRC::almost_zero()
should be use for floating point typed matrices and vectors. Overloads of the latter two forMaRC::Matrix
andMaRC::Vector
would be appropriate.