• Home
  • Raw
  • Download

Lines Matching full:scalar

24 void dont_over_optimize(T& x) { volatile typename T::Scalar tmp = x(0); x(0) = tmp; }  in dont_over_optimize()
26 template<typename Scalar, int Mode, int Options> void non_projective_only() in non_projective_only()
31 typedef Matrix<Scalar,3,1> Vector3; in non_projective_only()
32 typedef Quaternion<Scalar> Quaternionx; in non_projective_only()
33 typedef AngleAxis<Scalar> AngleAxisx; in non_projective_only()
34 typedef Transform<Scalar,3,Mode,Options> Transform3; in non_projective_only()
35 typedef DiagonalMatrix<Scalar,3> AlignedScaling3; in non_projective_only()
36 typedef Translation<Scalar,3> Translation3; in non_projective_only()
43 Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI)); in non_projective_only()
69 VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>())); in non_projective_only()
86 template<typename Scalar, int Mode, int Options> void transformations() in transformations()
93 typedef Matrix<Scalar,3,3> Matrix3; in transformations()
94 typedef Matrix<Scalar,4,4> Matrix4; in transformations()
95 typedef Matrix<Scalar,2,1> Vector2; in transformations()
96 typedef Matrix<Scalar,3,1> Vector3; in transformations()
97 typedef Matrix<Scalar,4,1> Vector4; in transformations()
98 typedef Quaternion<Scalar> Quaternionx; in transformations()
99 typedef AngleAxis<Scalar> AngleAxisx; in transformations()
100 typedef Transform<Scalar,2,Mode,Options> Transform2; in transformations()
101 typedef Transform<Scalar,3,Mode,Options> Transform3; in transformations()
103 typedef DiagonalMatrix<Scalar,3> AlignedScaling3; in transformations()
104 typedef Translation<Scalar,2> Translation2; in transformations()
105 typedef Translation<Scalar,3> Translation3; in transformations()
111 Scalar a = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI)); in transformations()
112 Scalar s0 = internal::random<Scalar>(), s1 = internal::random<Scalar>(); in transformations()
114 while(v0.norm() < test_precision<Scalar>()) v0 = Vector3::Random(); in transformations()
115 while(v1.norm() < test_precision<Scalar>()) v1 = Vector3::Random(); in transformations()
118 VERIFY_IS_APPROX(-v0, AngleAxisx(Scalar(EIGEN_PI), v0.unitOrthogonal()) * v0); in transformations()
119 if(abs(cos(a)) > test_precision<Scalar>()) in transformations()
132 matrot1 = AngleAxisx(Scalar(0.1), Vector3::UnitX()) in transformations()
133 * AngleAxisx(Scalar(0.2), Vector3::UnitY()) in transformations()
134 * AngleAxisx(Scalar(0.3), Vector3::UnitZ()); in transformations()
136 AngleAxisx(Scalar(0.1), Vector3(1,0,0)).toRotationMatrix() in transformations()
137 * (AngleAxisx(Scalar(0.2), Vector3(0,1,0)).toRotationMatrix() in transformations()
138 * (AngleAxisx(Scalar(0.3), Vector3(0,0,1)).toRotationMatrix() * v1))); in transformations()
145 …(aa.angle()) > test_precision<Scalar>()) && (abs(aa.axis().dot(v1.normalized()))<(Scalar(1)-Scalar in transformations()
153 …(aa.angle()) > test_precision<Scalar>()) && (abs(aa.axis().dot(v1.normalized()))<(Scalar(1)-Scalar in transformations()
171 while (abs(a)<Scalar(0.1)) in transformations()
172 a = internal::random<Scalar>(-Scalar(0.4)*Scalar(EIGEN_PI), Scalar(0.4)*Scalar(EIGEN_PI)); in transformations()
193 VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>())); in transformations()
215 tmat4.matrix()(3,3) = Scalar(1); in transformations()
218 Scalar a3 = internal::random<Scalar>(-Scalar(EIGEN_PI), Scalar(EIGEN_PI)); in transformations()
233 } while (v3.cwiseAbs().minCoeff()<NumTraits<Scalar>::epsilon()); in transformations()
268 if (abs(v21[k])<Scalar(1e-3)) v21[k] = Scalar(1e-3); in transformations()
270 t21.linear() = Rotation2D<Scalar>(a).toRotationMatrix(); in transformations()
275 t21.linear() = Rotation2D<Scalar>(-a).toRotationMatrix(); in transformations()
277 …t21.prescale(v21.cwiseInverse()).translate(-v20))).matrix().isIdentity(test_precision<Scalar>()) ); in transformations()
384 } while(t0.linear().jacobiSvd().singularValues()(2)<test_precision<Scalar>()); in transformations()
402 VERIFY_IS_APPROX(mat_rotation.determinant(), Scalar(1)); in transformations()
406 VERIFY_IS_APPROX(mat_rotation.determinant(), Scalar(1)); in transformations()
410 VERIFY_IS_APPROX(t1f.template cast<Scalar>(),t1); in transformations()
412 VERIFY_IS_APPROX(t1d.template cast<Scalar>(),t1); in transformations()
416 VERIFY_IS_APPROX(tr1f.template cast<Scalar>(),tr1); in transformations()
418 VERIFY_IS_APPROX(tr1d.template cast<Scalar>(),tr1); in transformations()
421 VERIFY_IS_APPROX(aa1f.template cast<Scalar>(),aa1); in transformations()
423 VERIFY_IS_APPROX(aa1d.template cast<Scalar>(),aa1); in transformations()
425 Rotation2D<Scalar> r2d1(internal::random<Scalar>()); in transformations()
427 VERIFY_IS_APPROX(r2d1f.template cast<Scalar>(),r2d1); in transformations()
429 VERIFY_IS_APPROX(r2d1d.template cast<Scalar>(),r2d1); in transformations()
433 Scalar angle = internal::random<Scalar>(-100,100); in transformations()
434 Rotation2D<Scalar> rot2(angle); in transformations()
436 VERIFY( rot2.smallestPositiveAngle() <= Scalar(2)*Scalar(EIGEN_PI) ); in transformations()
439 VERIFY( rot2.smallestAngle() >= -Scalar(EIGEN_PI) ); in transformations()
440 VERIFY( rot2.smallestAngle() <= Scalar(EIGEN_PI) ); in transformations()
443 Matrix<Scalar,2,2> rot2_as_mat(rot2); in transformations()
444 Rotation2D<Scalar> rot3(rot2_as_mat); in transformations()
448 s0 = internal::random<Scalar>(-100,100); in transformations()
449 s1 = internal::random<Scalar>(-100,100); in transformations()
450 Rotation2D<Scalar> R0(s0), R1(s1); in transformations()
465 VERIFY_IS_MUCH_SMALLER_THAN((R0.slerp(0.5, R0.inverse())).smallestAngle(), Scalar(1)); in transformations()
467 VERIFY_IS_APPROX(Scalar(EIGEN_PI), (R0.slerp(0.5, R0.inverse())).smallestPositiveAngle()); in transformations()
470 Scalar l = 0; in transformations()
474 Scalar a1 = R0.slerp(Scalar(k)/Scalar(path_steps), R1).angle(); in transformations()
475 Scalar a2 = R0.slerp(Scalar(k+1)/Scalar(path_steps), R1).angle(); in transformations()
478 VERIFY(l<=Scalar(EIGEN_PI)*(Scalar(1)+NumTraits<Scalar>::epsilon()*Scalar(path_steps/2))); in transformations()
482 Rotation2D<Scalar> r1; // default ctor in transformations()
483 r1 = Rotation2D<Scalar>(s0); // copy assignment in transformations()
485 Rotation2D<Scalar> r2(r1); // copy ctor in transformations()
519 template<typename Scalar, int Dim, int Options,typename RotationType>
522 typedef Matrix<Scalar,Dim,1> VectorType; in transform_associativity()
523 typedef Matrix<Scalar,Dim+1,1> HVectorType; in transform_associativity()
524 typedef Matrix<Scalar,Dim,Dim> LinearType; in transform_associativity()
525 typedef Matrix<Scalar,Dim+1,Dim+1> MatrixType; in transform_associativity()
526 typedef Transform<Scalar,Dim,AffineCompact,Options> AffineCompactType; in transform_associativity()
527 typedef Transform<Scalar,Dim,Affine,Options> AffineType; in transform_associativity()
528 typedef Transform<Scalar,Dim,Projective,Options> ProjectiveType; in transform_associativity()
529 typedef DiagonalMatrix<Scalar,Dim> ScalingType; in transform_associativity()
530 typedef Translation<Scalar,Dim> TranslationType; in transform_associativity()
540 Scalar s1 = internal::random<Scalar>(); in transform_associativity()
563 template<typename Scalar> void transform_alignment() in transform_alignment()
565 typedef Transform<Scalar,3,Projective,AutoAlign> Projective3a; in transform_alignment()
566 typedef Transform<Scalar,3,Projective,DontAlign> Projective3u; in transform_alignment()
568 EIGEN_ALIGN_MAX Scalar array1[16]; in transform_alignment()
569 EIGEN_ALIGN_MAX Scalar array2[16]; in transform_alignment()
570 EIGEN_ALIGN_MAX Scalar array3[16+1]; in transform_alignment()
571 Scalar* array3u = array3+1; in transform_alignment()
587 if(internal::packet_traits<Scalar>::Vectorizable) in transform_alignment()
592 template<typename Scalar, int Dim, int Options> void transform_products() in transform_products()
594 typedef Matrix<Scalar,Dim+1,Dim+1> Mat; in transform_products()
595 typedef Transform<Scalar,Dim,Projective,Options> Proj; in transform_products()
596 typedef Transform<Scalar,Dim,Affine,Options> Aff; in transform_products()
597 typedef Transform<Scalar,Dim,AffineCompact,Options> AffC; in transform_products()