Home
last modified time | relevance | path

Searched refs:VERIFY_IS_APPROX (Results 1 – 25 of 135) sorted by relevance

123456

/external/eigen/unsupported/test/
Dkronecker_product.cpp32 VERIFY_IS_APPROX(ab.coeff(0,0), -0.4017367630386106); in check_kronecker_product()
33 VERIFY_IS_APPROX(ab.coeff(0,1), 0.1056863433932735); in check_kronecker_product()
34 VERIFY_IS_APPROX(ab.coeff(0,2), -0.7255206194554212); in check_kronecker_product()
35 VERIFY_IS_APPROX(ab.coeff(0,3), 0.1908653336744706); in check_kronecker_product()
36 VERIFY_IS_APPROX(ab.coeff(0,4), 0.350864567234111); in check_kronecker_product()
37 VERIFY_IS_APPROX(ab.coeff(0,5), -0.0923032108308013); in check_kronecker_product()
38 VERIFY_IS_APPROX(ab.coeff(1,0), 0.415417514804677); in check_kronecker_product()
39 VERIFY_IS_APPROX(ab.coeff(1,1), -0.2369227701722048); in check_kronecker_product()
40 VERIFY_IS_APPROX(ab.coeff(1,2), 0.7502275131458511); in check_kronecker_product()
41 VERIFY_IS_APPROX(ab.coeff(1,3), -0.4278731019742696); in check_kronecker_product()
[all …]
Dlevenberg_marquardt.cpp79 VERIFY_IS_APPROX(lm.fvec().blueNorm(), 0.09063596); in testLmder1()
84 VERIFY_IS_APPROX(x, x_ref); in testLmder1()
109 VERIFY_IS_APPROX(fnorm, 0.09063596); in testLmder()
114 VERIFY_IS_APPROX(x, x_ref); in testLmder()
130 VERIFY_IS_APPROX( cov, cov_ref); in testLmder()
181 VERIFY_IS_APPROX(fvec.blueNorm(), 0.09063596); in testLmdif1()
186 VERIFY_IS_APPROX(x, x_ref); in testLmdif1()
212 VERIFY_IS_APPROX(fnorm, 0.09063596); in testLmdif()
217 VERIFY_IS_APPROX(x, x_ref); in testLmdif()
233 VERIFY_IS_APPROX( cov, cov_ref); in testLmdif()
[all …]
DNonLinearOptimization.cpp100 VERIFY_IS_APPROX(fvec, fvec_ref); in testChkder()
101 VERIFY_IS_APPROX(fvecp, fvecp_ref); in testChkder()
102 VERIFY_IS_APPROX(err, err_ref); in testChkder()
186 VERIFY_IS_APPROX(lm.fvec.blueNorm(), 0.09063596); in testLmder1()
191 VERIFY_IS_APPROX(x, x_ref); in testLmder1()
216 VERIFY_IS_APPROX(fnorm, 0.09063596); in testLmder()
221 VERIFY_IS_APPROX(x, x_ref); in testLmder()
237 VERIFY_IS_APPROX( cov, cov_ref); in testLmder()
300 VERIFY_IS_APPROX(solver.fvec.blueNorm(), 1.192636e-08); in testHybrj1()
309 VERIFY_IS_APPROX(x, x_ref); in testHybrj1()
[all …]
Dalignedvector3.cpp26 VERIFY_IS_APPROX(f1,r1); in alignedvector3()
27 VERIFY_IS_APPROX(f4,r4); in alignedvector3()
29 VERIFY_IS_APPROX(f4+f1,r4+r1); in alignedvector3()
30 VERIFY_IS_APPROX(f4-f1,r4-r1); in alignedvector3()
31 VERIFY_IS_APPROX(f4+f1-f2,r4+r1-r2); in alignedvector3()
32 VERIFY_IS_APPROX(f4+=f3,r4+=r3); in alignedvector3()
33 VERIFY_IS_APPROX(f4-=f5,r4-=r5); in alignedvector3()
34 VERIFY_IS_APPROX(f4-=f5+f1,r4-=r5+r1); in alignedvector3()
35 VERIFY_IS_APPROX(f5+f1-s1*f2,r5+r1-s1*r2); in alignedvector3()
36 VERIFY_IS_APPROX(f5+f1/s2-s1*f2,r5+r1/s2-s1*r2); in alignedvector3()
[all …]
/external/eigen/test/eigen2/
Deigen2_geometry_with_eigen2_prefix.cpp61 VERIFY_IS_APPROX(Quaternionx(Quaternionx::Identity()).coeffs(), q2.coeffs()); in geometry()
63 VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs()); in geometry()
68 VERIFY_IS_APPROX(u0.unitOrthogonal().norm(), Scalar(1)); in geometry()
69 VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), Scalar(1)); in geometry()
72 VERIFY_IS_APPROX(v0, AngleAxisx(a, v0.normalized()) * v0); in geometry()
73 VERIFY_IS_APPROX(-v0, AngleAxisx(Scalar(M_PI), v0.unitOrthogonal()) * v0); in geometry()
74VERIFY_IS_APPROX(ei_cos(a)*v0.squaredNorm(), v0.eigen2_dot(AngleAxisx(a, v0.unitOrthogonal()) * v0… in geometry()
76 VERIFY_IS_APPROX(Matrix3::Identity(), m * AngleAxisx(a, v0.normalized())); in geometry()
77 VERIFY_IS_APPROX(Matrix3::Identity(), AngleAxisx(a, v0.normalized()) * m); in geometry()
93 VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2); in geometry()
[all …]
Deigen2_geometry.cpp59 VERIFY_IS_APPROX(Quaternionx(Quaternionx::Identity()).coeffs(), q2.coeffs()); in geometry()
61 VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs()); in geometry()
66 VERIFY_IS_APPROX(u0.unitOrthogonal().norm(), Scalar(1)); in geometry()
67 VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), Scalar(1)); in geometry()
70 VERIFY_IS_APPROX(v0, AngleAxisx(a, v0.normalized()) * v0); in geometry()
71 VERIFY_IS_APPROX(-v0, AngleAxisx(Scalar(M_PI), v0.unitOrthogonal()) * v0); in geometry()
72VERIFY_IS_APPROX(ei_cos(a)*v0.squaredNorm(), v0.eigen2_dot(AngleAxisx(a, v0.unitOrthogonal()) * v0… in geometry()
74 VERIFY_IS_APPROX(Matrix3::Identity(), m * AngleAxisx(a, v0.normalized())); in geometry()
75 VERIFY_IS_APPROX(Matrix3::Identity(), AngleAxisx(a, v0.normalized()) * m); in geometry()
91 VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2); in geometry()
[all …]
Deigen2_cwiseop.cpp53 VERIFY_IS_APPROX(mzero(i,j), Scalar(0)); in cwiseops()
54 VERIFY_IS_APPROX(mones(i,j), Scalar(1)); in cwiseops()
55 VERIFY_IS_APPROX(m3(i,j), s1); in cwiseops()
61 VERIFY_IS_APPROX(m4.setConstant(s1), m3); in cwiseops()
62 VERIFY_IS_APPROX(m4.setConstant(rows,cols,s1), m3); in cwiseops()
63 VERIFY_IS_APPROX(m4.setZero(), mzero); in cwiseops()
64 VERIFY_IS_APPROX(m4.setZero(rows,cols), mzero); in cwiseops()
65 VERIFY_IS_APPROX(m4.setOnes(), mones); in cwiseops()
66 VERIFY_IS_APPROX(m4.setOnes(rows,cols), mones); in cwiseops()
68 VERIFY_IS_APPROX(m4, m3); in cwiseops()
[all …]
Deigen2_linearstructure.cpp36 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure()
37 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure()
38 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure()
39 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure()
40 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure()
41 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure()
42 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure()
44 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure()
46 VERIFY_IS_APPROX(m3, m2-m1); in linearStructure()
48 VERIFY_IS_APPROX(m3, s1*m2); in linearStructure()
[all …]
Deigen2_sparse_product.cpp35 VERIFY_IS_APPROX(m4=m2*m3, refMat4=refMat2*refMat3); in sparse_product()
36 VERIFY_IS_APPROX(m4=m2.transpose()*m3, refMat4=refMat2.transpose()*refMat3); in sparse_product()
37VERIFY_IS_APPROX(m4=m2.transpose()*m3.transpose(), refMat4=refMat2.transpose()*refMat3.transpose()… in sparse_product()
38 VERIFY_IS_APPROX(m4=m2*m3.transpose(), refMat4=refMat2*refMat3.transpose()); in sparse_product()
41 VERIFY_IS_APPROX(dm4=m2*refMat3, refMat4=refMat2*refMat3); in sparse_product()
42 VERIFY_IS_APPROX(dm4=m2*refMat3.transpose(), refMat4=refMat2*refMat3.transpose()); in sparse_product()
43 VERIFY_IS_APPROX(dm4=m2.transpose()*refMat3, refMat4=refMat2.transpose()*refMat3); in sparse_product()
44VERIFY_IS_APPROX(dm4=m2.transpose()*refMat3.transpose(), refMat4=refMat2.transpose()*refMat3.trans… in sparse_product()
47 VERIFY_IS_APPROX(dm4=refMat2*m3, refMat4=refMat2*refMat3); in sparse_product()
48 VERIFY_IS_APPROX(dm4=refMat2*m3.transpose(), refMat4=refMat2*refMat3.transpose()); in sparse_product()
[all …]
/external/eigen/test/
Dgeo_transformations.cpp39 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in non_projective_only()
46 VERIFY_IS_APPROX( (t0 * Vector3(1,0,0)).template head<3>().norm(), v0.x()); in non_projective_only()
61 VERIFY_IS_APPROX(t1.matrix(), t0.matrix()); in non_projective_only()
62 VERIFY_IS_APPROX(t1*v1, t0*v1); in non_projective_only()
67 VERIFY_IS_APPROX((t0 * v1).template head<3>(), Translation3(v0) * v1); in non_projective_only()
72 VERIFY_IS_APPROX((t0 * v1).template head<3>(), AlignedScaling3(v0) * v1); in non_projective_only()
108 VERIFY_IS_APPROX(v0, AngleAxisx(a, v0.normalized()) * v0); in transformations()
109 VERIFY_IS_APPROX(-v0, AngleAxisx(Scalar(M_PI), v0.unitOrthogonal()) * v0); in transformations()
112 VERIFY_IS_APPROX(cos(a)*v0.squaredNorm(), v0.dot(AngleAxisx(a, v0.unitOrthogonal()) * v0)); in transformations()
115 VERIFY_IS_APPROX(Matrix3::Identity(), m * AngleAxisx(a, v0.normalized())); in transformations()
[all …]
Dmixingtypes.cpp61 VERIFY_IS_APPROX(vcf * sf , vcf * complex<float>(sf)); in mixingtypes()
62 VERIFY_IS_APPROX(sd * vcd, complex<double>(sd) * vcd); in mixingtypes()
63 VERIFY_IS_APPROX(vf * scf , vf.template cast<complex<float> >() * scf); in mixingtypes()
64 VERIFY_IS_APPROX(scd * vd, scd * vd.template cast<complex<double> >()); in mixingtypes()
71 VERIFY_IS_APPROX(vcf.dot(vf), vcf.dot(vf.template cast<complex<float> >())); in mixingtypes()
74 VERIFY_IS_APPROX(vf.asDiagonal() * mcf, vf.template cast<complex<float> >().asDiagonal() * mcf); in mixingtypes()
75 VERIFY_IS_APPROX(vcd.asDiagonal() * md, vcd.asDiagonal() * md.template cast<complex<double> >()); in mixingtypes()
76 VERIFY_IS_APPROX(mcf * vf.asDiagonal(), mcf * vf.template cast<complex<float> >().asDiagonal()); in mixingtypes()
77 VERIFY_IS_APPROX(md * vcd.asDiagonal(), md.template cast<complex<double> >() * vcd.asDiagonal()); in mixingtypes()
82VERIFY_IS_APPROX((vf.transpose() * vcf).value(), (vf.template cast<complex<float> >().transpose() … in mixingtypes()
[all …]
Darray.cpp33 VERIFY_IS_APPROX(m1 + s1, s1 + m1); in array()
34 VERIFY_IS_APPROX(m1 + s1, ArrayType::Constant(rows,cols,s1) + m1); in array()
35 VERIFY_IS_APPROX(s1 - m1, (-m1)+s1 ); in array()
36 VERIFY_IS_APPROX(m1 - s1, m1 - ArrayType::Constant(rows,cols,s1)); in array()
37 VERIFY_IS_APPROX(s1 - m1, ArrayType::Constant(rows,cols,s1) - m1); in array()
38 VERIFY_IS_APPROX((m1*Scalar(2)) - s2, (m1+m1) - ArrayType::Constant(rows,cols,s2) ); in array()
41 VERIFY_IS_APPROX(m3, m1 + s2); in array()
44 VERIFY_IS_APPROX(m3, m1 - s1); in array()
49 VERIFY_IS_APPROX(m1, m3 - m2); in array()
53 VERIFY_IS_APPROX(m1, m3 + m2); in array()
[all …]
Dcwiseop.cpp40 VERIFY_IS_APPROX(m1.cwise() / m2, m1.cwise() * (m2.cwise().inverse())); in cwiseops_real_only()
42 VERIFY_IS_APPROX(m3.cwise().square(), m1.cwise().abs()); in cwiseops_real_only()
43 VERIFY_IS_APPROX(m1.cwise().square().cwise().sqrt(), m1.cwise().abs()); in cwiseops_real_only()
44 VERIFY_IS_APPROX(m1.cwise().abs().cwise().log().cwise().exp() , m1.cwise().abs()); in cwiseops_real_only()
46 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops_real_only()
48 VERIFY_IS_APPROX(m3.cwise().pow(-1), m3.cwise().inverse()); in cwiseops_real_only()
50 VERIFY_IS_APPROX(m3.cwise().pow(RealScalar(0.5)), m3.cwise().sqrt()); in cwiseops_real_only()
53 VERIFY_IS_APPROX(mones, m1.cwise().sin().cwise().square() + m1.cwise().cos().cwise().square()); in cwiseops_real_only()
56 VERIFY_IS_APPROX(m3, m1.cwise() / m2); in cwiseops_real_only()
100 VERIFY_IS_APPROX(mzero(i,j), Scalar(0)); in cwiseops()
[all …]
Dsparse_product.cpp19VERIFY_IS_APPROX(m4=m2.col(c)*refMat2.col(c1).transpose(), refMat4=refMat2.col(c)*refMat2.col(c1).… in run()
20VERIFY_IS_APPROX(m4=refMat2.col(c1)*m2.col(c).transpose(), refMat4=refMat2.col(c1)*refMat2.col(c).… in run()
29VERIFY_IS_APPROX(m4=m2.row(r).transpose()*refMat2.col(c1).transpose(), refMat4=refMat2.row(r).tran… in run()
30 VERIFY_IS_APPROX(m4=refMat2.col(c1)*m2.row(r), refMat4=refMat2.col(c1)*refMat2.row(r)); in run()
88 VERIFY_IS_APPROX(m4=m2*m3, refMat4=refMat2*refMat3); in sparse_product()
89 VERIFY_IS_APPROX(m4=m2t.transpose()*m3, refMat4=refMat2t.transpose()*refMat3); in sparse_product()
90VERIFY_IS_APPROX(m4=m2t.transpose()*m3t.transpose(), refMat4=refMat2t.transpose()*refMat3t.transpo… in sparse_product()
91 VERIFY_IS_APPROX(m4=m2*m3t.transpose(), refMat4=refMat2*refMat3t.transpose()); in sparse_product()
93 VERIFY_IS_APPROX(m4 = m2*m3/s1, refMat4 = refMat2*refMat3/s1); in sparse_product()
94 VERIFY_IS_APPROX(m4 = m2*m3*s1, refMat4 = refMat2*refMat3*s1); in sparse_product()
[all …]
Dsparse_vector.cpp54 VERIFY_IS_APPROX(v1, refV1); in sparse_vector()
58 VERIFY_IS_APPROX(v1, refV1); in sparse_vector()
60 VERIFY_IS_APPROX(v1+v2, refV1+refV2); in sparse_vector()
61 VERIFY_IS_APPROX(v1+v2+v3, refV1+refV2+refV3); in sparse_vector()
63 VERIFY_IS_APPROX(v1*s1-v2, refV1*s1-refV2); in sparse_vector()
65 VERIFY_IS_APPROX(v1*=s1, refV1*=s1); in sparse_vector()
66 VERIFY_IS_APPROX(v1/=s1, refV1/=s1); in sparse_vector()
68 VERIFY_IS_APPROX(v1+=v2, refV1+=refV2); in sparse_vector()
69 VERIFY_IS_APPROX(v1-=v2, refV1-=refV2); in sparse_vector()
71 VERIFY_IS_APPROX(v1.dot(v2), refV1.dot(refV2)); in sparse_vector()
[all …]
Dlinearstructure.cpp36 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure()
37 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure()
38 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure()
39 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure()
40 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure()
41 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure()
42 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure()
44 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure()
46 VERIFY_IS_APPROX(m3, m2-m1); in linearStructure()
48 VERIFY_IS_APPROX(m3, s1*m2); in linearStructure()
[all …]
Dvectorwiseop.cpp37 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_array()
38 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_array()
45 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_array()
46 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_array()
55 VERIFY_IS_APPROX(m2, m1.colwise() - colvec); in vectorwiseop_array()
56 VERIFY_IS_APPROX(m2.col(c), m1.col(c) - colvec); in vectorwiseop_array()
63 VERIFY_IS_APPROX(m2, m1.rowwise() - rowvec); in vectorwiseop_array()
64 VERIFY_IS_APPROX(m2.row(r), m1.row(r) - rowvec); in vectorwiseop_array()
73 VERIFY_IS_APPROX(m2, m1.colwise() * colvec); in vectorwiseop_array()
74 VERIFY_IS_APPROX(m2.col(c), m1.col(c) * colvec); in vectorwiseop_array()
[all …]
Dgeo_alignedbox.cpp55 VERIFY_IS_APPROX(b2.clamp(b0), b0); in alignedbox()
97 VERIFY_IS_APPROX(hp1f.template cast<Scalar>(),b0); in alignedboxCastTests()
99 VERIFY_IS_APPROX(hp1d.template cast<Scalar>(),b0); in alignedboxCastTests()
112 VERIFY_IS_APPROX(sides, box.sizes() ); in specificTest1()
113 VERIFY_IS_APPROX(sides[1], box.sizes()[1] ); in specificTest1()
114 VERIFY_IS_APPROX(sides[1], box.sizes().maxCoeff() ); in specificTest1()
115 VERIFY_IS_APPROX(sides[0], box.sizes().minCoeff() ); in specificTest1()
117 VERIFY_IS_APPROX( 14.0f, box.volume() ); in specificTest1()
118 VERIFY_IS_APPROX( 53.0f, box.diagonal().squaredNorm() ); in specificTest1()
119 VERIFY_IS_APPROX( std::sqrt( 53.0f ), box.diagonal().norm() ); in specificTest1()
[all …]
Dgeo_homogeneous.cpp39 VERIFY_IS_APPROX(v0.homogeneous(), hv0); in homogeneous()
40 VERIFY_IS_APPROX(v0, hv0.hnormalized()); in homogeneous()
43 VERIFY_IS_APPROX(m0.colwise().homogeneous(), hm0); in homogeneous()
44 VERIFY_IS_APPROX(m0, hm0.colwise().hnormalized()); in homogeneous()
48 VERIFY_IS_APPROX(m0, hm0.colwise().hnormalized()); in homogeneous()
51 VERIFY_IS_APPROX(t1 * (v0.homogeneous().eval()), t1 * v0.homogeneous()); in homogeneous()
52 VERIFY_IS_APPROX(t1 * (m0.colwise().homogeneous().eval()), t1 * m0.colwise().homogeneous()); in homogeneous()
55 VERIFY_IS_APPROX(t2 * (v0.homogeneous().eval()), t2 * v0.homogeneous()); in homogeneous()
56 VERIFY_IS_APPROX(t2 * (m0.colwise().homogeneous().eval()), t2 * m0.colwise().homogeneous()); in homogeneous()
58 VERIFY_IS_APPROX((v0.transpose().rowwise().homogeneous().eval()) * t2, in homogeneous()
[all …]
Dgeo_quaternion.cpp73 VERIFY_IS_APPROX(Quaternionx(Quaternionx::Identity()).coeffs(), q2.coeffs()); in quaternion()
75 VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs()); in quaternion()
94 VERIFY_IS_APPROX(q1 * v2, q1.toRotationMatrix() * v2); in quaternion()
95 VERIFY_IS_APPROX(q1 * q2 * v2, in quaternion()
102 VERIFY_IS_APPROX(q1*v1,q2*v1); in quaternion()
107 VERIFY_IS_APPROX(q1 * v1, Quaternionx(aa) * v1); in quaternion()
119 VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized()); in quaternion()
120 VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized()); in quaternion()
121 VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized()); in quaternion()
125 VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); in quaternion()
[all …]
Dproduct.h61 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in product()
64 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product()
65 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product()
68 VERIFY_IS_APPROX(square*(m1 + m2), square*m1+square*m2); in product()
69 VERIFY_IS_APPROX(square*(m1 - m2), square*m1-square*m2); in product()
72 VERIFY_IS_APPROX(s1*(square*m1), (s1*square)*m1); in product()
73 VERIFY_IS_APPROX(s1*(square*m1), square*(m1*s1)); in product()
76 VERIFY_IS_APPROX(v1, identity*v1); in product()
77 VERIFY_IS_APPROX(v1.transpose(), v1.transpose() * identity); in product()
79 VERIFY_IS_APPROX(MatrixType::Identity(rows, cols)(r,c), static_cast<Scalar>(r==c)); in product()
[all …]
Darray_for_matrix.cpp33 VERIFY_IS_APPROX(m1.array() + s1, s1 + m1.array()); in array_for_matrix()
34 VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1); in array_for_matrix()
35VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,… in array_for_matrix()
38 VERIFY_IS_APPROX(m3, (m1.array() + s2).matrix()); in array_for_matrix()
41 VERIFY_IS_APPROX(m3, (m1.array() - s1).matrix()); in array_for_matrix()
48 VERIFY_IS_APPROX(m1.colwise().sum(), m1.colwise().redux(internal::scalar_sum_op<Scalar>())); in array_for_matrix()
52 VERIFY_IS_APPROX(m3.colwise() += cv1, m1.colwise() + cv1); in array_for_matrix()
54 VERIFY_IS_APPROX(m3.colwise() -= cv1, m1.colwise() - cv1); in array_for_matrix()
56 VERIFY_IS_APPROX(m3.rowwise() += rv1, m1.rowwise() + rv1); in array_for_matrix()
58 VERIFY_IS_APPROX(m3.rowwise() -= rv1, m1.rowwise() - rv1); in array_for_matrix()
[all …]
Dsparse_basic.cpp49 VERIFY_IS_APPROX(m, refMat); in sparse_basic()
54 VERIFY_IS_APPROX(m, refMat); in sparse_basic()
118 VERIFY_IS_APPROX(m2,m1); in sparse_basic()
141 VERIFY_IS_APPROX(m2,m1); in sparse_basic()
163 VERIFY_IS_APPROX(m2,m1); in sparse_basic()
174 VERIFY_IS_APPROX(m2.innerVector(j0), refMat2.row(j0)); in sparse_basic()
176 VERIFY_IS_APPROX(m2.innerVector(j0), refMat2.col(j0)); in sparse_basic()
179 VERIFY_IS_APPROX(m2.innerVector(j0)+m2.innerVector(j1), refMat2.row(j0)+refMat2.row(j1)); in sparse_basic()
181 VERIFY_IS_APPROX(m2.innerVector(j0)+m2.innerVector(j1), refMat2.col(j0)+refMat2.col(j1)); in sparse_basic()
218 VERIFY_IS_APPROX(m2.innerVectors(j0,n0), refMat2.block(j0,0,n0,cols)); in sparse_basic()
[all …]
Dproduct_extra.cpp41 VERIFY_IS_APPROX(m3.noalias() = m1 * m2.adjoint(), m1 * m2.adjoint().eval()); in product_extra()
42VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * square.adjoint(), m1.adjoint().eval() * square.ad… in product_extra()
43 VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * m2, m1.adjoint().eval() * m2); in product_extra()
44VERIFY_IS_APPROX(m3.noalias() = (s1 * m1.adjoint()) * m2, (s1 * m1.adjoint()).eval() * m2… in product_extra()
45VERIFY_IS_APPROX(m3.noalias() = ((s1 * m1).adjoint()) * m2, (numext::conj(s1) * m1.adjoint(… in product_extra()
46VERIFY_IS_APPROX(m3.noalias() = (- m1.adjoint() * s1) * (s3 * m2), (- m1.adjoint() * s1).eval() *… in product_extra()
47VERIFY_IS_APPROX(m3.noalias() = (s2 * m1.adjoint() * s1) * m2, (s2 * m1.adjoint() * s1).eval(… in product_extra()
48VERIFY_IS_APPROX(m3.noalias() = (-m1*s2) * s1*m2.adjoint(), (-m1*s2).eval() * (s1*m2.adjoin… in product_extra()
51VERIFY_IS_APPROX( m1.adjoint() * (s1*m2).conjugate(), (m1.adjoint()).eval() * ((s1*m2).conjugate()… in product_extra()
56 VERIFY_IS_APPROX((-m1.conjugate() * s2) * (s1 * vc2), in product_extra()
[all …]
Ddiagonalmatrices.cpp38 VERIFY_IS_APPROX(sq_m1, v1.asDiagonal().toDenseMatrix()); in diagonalmatrices()
40 VERIFY_IS_APPROX(sq_m1, v1.asDiagonal().toDenseMatrix()); in diagonalmatrices()
42 VERIFY_IS_APPROX(sq_m1, sq_m2); in diagonalmatrices()
46 VERIFY_IS_APPROX(ldm1.diagonal(), ldm3.diagonal()); in diagonalmatrices()
48 VERIFY_IS_APPROX(ldm1.diagonal(), ldm4.diagonal()); in diagonalmatrices()
51 VERIFY_IS_APPROX(sq_m1, ldm1.toDenseMatrix()); in diagonalmatrices()
53 VERIFY_IS_APPROX(sq_m1, ldm1.toDenseMatrix()); in diagonalmatrices()
58 VERIFY_IS_APPROX( ((ldm1 * m1)(i,j)) , ldm1.diagonal()(i) * m1(i,j) ); in diagonalmatrices()
59 VERIFY_IS_APPROX( ((ldm1 * (m1+m2))(i,j)) , ldm1.diagonal()(i) * (m1+m2)(i,j) ); in diagonalmatrices()
60 VERIFY_IS_APPROX( ((m1 * rdm1)(i,j)) , rdm1.diagonal()(j) * m1(i,j) ); in diagonalmatrices()
[all …]

123456