matrix_functions.h File Reference
#include "main.h"
#include <unsupported/Eigen/MatrixFunctions>

Go to the source code of this file.

Classes

struct  processTriangularMatrix< MatrixType, IsComplex >
 
struct  processTriangularMatrix< MatrixType, 0 >
 
struct  generateTestMatrix< MatrixType, 0 >
 
struct  generateTestMatrix< MatrixType, 1 >
 

Functions

template<typename Derived , typename OtherDerived >
Derived::RealScalar relerr (const MatrixBase< Derived > &A, const MatrixBase< OtherDerived > &B)
 

Function Documentation

◆ relerr()

template<typename Derived , typename OtherDerived >
Derived::RealScalar relerr ( const MatrixBase< Derived > &  A,
const MatrixBase< OtherDerived > &  B 
)
54  {
55  return std::sqrt((A - B).cwiseAbs2().sum() / (std::min)(A.cwiseAbs2().sum(), B.cwiseAbs2().sum()));
56 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: matrices.h:74
#define min(a, b)
Definition: datatypes.h:22

References min, and sqrt().

Referenced by Eigen::internal::blueNorm_impl(), pblueNorm(), randomTest(), test2dHyperbolicRotation(), test2dRotation(), and testPascal().