mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* Fix a couple of issues related to the recent cache friendly products
* Improve the efficiency of matrix*vector in unaligned cases * Trivial fixes in the destructors of MatrixStorage * Removed the matrixNorm in test/product.cpp (twice faster and that assumed the matrix product was ok while checking that !!)
This commit is contained in:
@@ -23,12 +23,14 @@
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "main.h"
|
||||
#include <Eigen/Array>
|
||||
#include <Eigen/QR>
|
||||
|
||||
template<typename Derived1, typename Derived2>
|
||||
bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = precision<typename Derived1::RealScalar>())
|
||||
{
|
||||
return !((m1-m2).matrixNorm() < epsilon * std::max(m1.matrixNorm(), m2.matrixNorm()));
|
||||
return !((m1-m2).cwise().abs2().maxCoeff() < epsilon * epsilon
|
||||
* std::max(m1.cwise().abs2().maxCoeff(), m2.cwise().abs2().maxCoeff()));
|
||||
}
|
||||
|
||||
template<typename MatrixType> void product(const MatrixType& m)
|
||||
|
||||
Reference in New Issue
Block a user