17 float data0_check[12] = {
18 -0.3375f, -0.1f, 0.1375f,
19 -0.13333333f, -0.03333333f, 0.06666667f,
20 0.07083333f, 0.03333333f, -0.00416667f,
38 float data1_check[12] = {
39 -0.3375f, -0.13333333f, 0.07083333f, 0.275f,
40 -0.1f, -0.03333333f, 0.03333333f, 0.1f,
41 0.1375f, 0.06666667f, -0.00416667f, -0.075f
53 Matrix<float, n_large - 1, n_large> A_large_I;
55 for (
size_t i = 0; i <
n_large; i++) {
56 A_large_I =
geninv(A_large);
61 float data2[9] = {0, 2, 3,
65 float data2_check[9] = {
83 const float B_quad_w[6][16] = {
84 {-0.5717536f, 0.43756646f, 0.5717536f, -0.43756646f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f},
85 { 0.35355328f, -0.35355328f, 0.35355328f, -0.35355328f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f},
86 { 0.28323701f, 0.28323701f, -0.28323701f, -0.28323701f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f},
87 { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f},
88 { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f},
89 {-0.25f, -0.25f, -0.25f, -0.25f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}
92 const float A_quad_w[16][6] = {
93 { -0.495383f, 0.707107f, 0.765306f, 0.0f, 0.0f, -1.000000f },
94 { 0.495383f, -0.707107f, 1.000000f, 0.0f, 0.0f, -1.000000f },
95 { 0.495383f, 0.707107f, -0.765306f, 0.0f, 0.0f, -1.000000f },
96 { -0.495383f, -0.707107f, -1.000000f, 0.0f, 0.0f, -1.000000f },
97 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
98 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
99 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
100 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
101 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
102 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
103 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
104 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
105 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
106 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
107 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
108 { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
122 TEST((retM0 - retM_check).
abs().
max() < 1e-5);
123 TEST((retN0 - retN_check).
abs().
max() < 1e-5);
127 TEST((retM1 - retM_check).
abs().
max() < 1e-5);
128 TEST((retN1 - retN_check).
abs().
max() < 1e-5);
130 float float_scale = 1.f;
132 double double_scale = 1.;
134 TEST(static_cast<double>(float_scale) > double_scale);
static Matrix< Type, N, M > genInvUnderdetermined(const Matrix< Type, M, N > &G, const Matrix< Type, M, M > &L, size_t rank)
static const size_t n_large
bool isEqual(const Matrix< Type, M, N > &x, const Matrix< Type, M, N > &y, const Type eps=1e-4f)
static Matrix< Type, N, M > genInvOverdetermined(const Matrix< Type, M, N > &G, const Matrix< Type, N, N > &L, size_t rank)
void fullRankCholeskyTolerance(Type &tol)
Full rank Cholesky factorization of A.
Implementation of matrix pseudo inverse.
Dual< Scalar, N > max(const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
Dual< Scalar, N > abs(const Dual< Scalar, N > &a)
Matrix< Type, N, M > geninv(const Matrix< Type, M, N > &G)
Geninv Fast pseudoinverse based on full rank cholesky factorisation.