30 #ifndef CORE_DATATYPES_MATRIX_COMPARISON_H
31 #define CORE_DATATYPES_MATRIX_COMPARISON_H
47 (lhs.rows() == rhs.rows()) &&
48 (lhs.cols() == rhs.cols());
52 for (
int i = 0; returnValue && i < lhs.rows(); ++i)
54 for (
int j = 0; returnValue && j < lhs.cols(); ++j)
56 returnValue &= std::fabs(lhs(i,j) - rhs(i,j)) < 1e-15;
72 bool returnValue = (lhs.rows() == rhs.rows());
76 for (
int i = 0; returnValue && i < lhs.rows(); ++i)
78 returnValue &= std::fabs(lhs(i) - rhs(i)) < 1e-15;
93 if (lhs.rows() != rhs.rows())
95 if (lhs.cols() != rhs.cols())
98 for (
int k = 0; k < lhs.outerSize(); ++k)
102 for (; it1 && it2; ++it1, ++it2)
104 if (it1.index() != it2.index())
106 if (it1.value() != it2.value())
113 template <
typename T>
116 return !(lhs == rhs);
Definition: DenseColumnMatrix.h:43
Definition: DenseMatrix.h:44
bool operator!=(const DenseMatrixGeneric< T > &lhs, const DenseMatrixGeneric< T > &rhs)
Definition: MatrixComparison.h:64
bool operator==(const DenseMatrixGeneric< T > &lhs, const DenseMatrixGeneric< T > &rhs)
Definition: MatrixComparison.h:44
Definition: MatrixFwd.h:64