11 #include <Eigen/Geometry> 27 Vector3
v0 = Vector3::Random(),
28 v1 = Vector3::Random(),
29 v2 = Vector3::Random();
38 mat3 << v0.normalized(),
39 (v0.cross(
v1)).normalized(),
40 (v0.cross(
v1).cross(v0)).normalized();
49 Vector3
vec3 = Vector3::Random();
51 int i = internal::random<int>(0,2);
52 mcross = mat3.colwise().cross(vec3);
61 mcross = mat3.rowwise().cross(vec3);
65 Vector4 v40 = Vector4::Random(),
66 v41 = Vector4::Random(),
67 v42 = Vector4::Random();
68 v40.w() = v41.w() = v42.w() = 0;
69 v42.template head<3>() = v40.template head<3>().cross(v41.template head<3>());
75 RealVector3 rv1 = RealVector3::Random();
88 VectorType
v0 = VectorType::Random(
size);
97 v0.tail(
size-2).setRandom();
104 Vector3
vec3 = Vector3::Random();
105 int i = internal::random<int>(0,
size-1);
107 Matrix3N mat3N(3,
size), mcross3N(3,
size);
109 mcross3N = mat3N.colwise().cross(vec3);
112 MatrixN3 matN3(
size,3), mcrossN3(
size,3);
114 mcrossN3 = matN3.rowwise().cross(vec3);
121 CALL_SUBTEST_1( orthomethods_3<float>() );
122 CALL_SUBTEST_2( orthomethods_3<double>() );
124 CALL_SUBTEST_1( (orthomethods<float,2>()) );
125 CALL_SUBTEST_2( (orthomethods<double,2>()) );
126 CALL_SUBTEST_1( (orthomethods<float,3>()) );
127 CALL_SUBTEST_2( (orthomethods<double,3>()) );
128 CALL_SUBTEST_3( (orthomethods<float,7>()) );
129 CALL_SUBTEST_4( (
orthomethods<std::complex<double>,8>()) );
130 CALL_SUBTEST_5( (orthomethods<float,Dynamic>(36)) );
131 CALL_SUBTEST_6( (orthomethods<double,Dynamic>(35)) );
void diagonal(const MatrixType &m)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void orthomethods(int size=Size)
#define VERIFY_IS_APPROX(a, b)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbsReturnType cwiseAbs() const
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
static Vector9 vec3(const Matrix3 &R)
The matrix class, also used for vectors and row-vectors.
void test_geo_orthomethods()