17 Vector4i indices(0,1,2,3);
18 for(
int i = 0;
i < 24; ++
i)
25 std::next_permutation(indices.data(),indices.data()+4);
33 double error_sum = 0., error_max = 0.;
39 m = MatrixType::Random();
41 }
while(!is_invertible);
43 double error = double( (m*inv-MatrixType::Identity()).norm());
45 error_max = (
std::max)(error_max, error);
47 std::cerr <<
"inverse_general_4x4, Scalar = " << type_name<Scalar>() << std::endl;
48 double error_avg = error_sum /
repeat;
65 mat.template block<4,4>(
i,
j) = submat.inverse();
void inverse_permutation_4x4()
#define EIGEN_DEBUG_VAR(x)
InverseReturnType inverse() const
#define CALL_SUBTEST_3(FUNC)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void inverse_general_4x4(int repeat)
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
LU decomposition of a matrix with complete pivoting, and related features.
EIGEN_DECLARE_TEST(prec_inverse_4x4)
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)
constexpr array< t, n > repeat(t v)