12 #ifndef EIGEN_TRANSFORM_H
13 #define EIGEN_TRANSFORM_H
21 template<
typename Transform>
22 struct transform_traits
27 HDim = Transform::HDim,
28 Mode = Transform::Mode,
33 template<
typename TransformType,
35 int Case = transform_traits<TransformType>::IsProjective ? 0
36 : int(MatrixType::RowsAtCompileTime) == int(transform_traits<TransformType>::HDim) ? 1
38 int RhsCols = MatrixType::ColsAtCompileTime>
39 struct transform_right_product_impl;
41 template<
typename Other,
46 int OtherRows=Other::RowsAtCompileTime,
47 int OtherCols=Other::ColsAtCompileTime>
48 struct transform_left_product_impl;
50 template<
typename Lhs,
53 transform_traits<Lhs>::IsProjective ||
54 transform_traits<Rhs>::IsProjective>
55 struct transform_transform_product_impl;
57 template<
typename Other,
62 int OtherRows=Other::RowsAtCompileTime,
63 int OtherCols=Other::ColsAtCompileTime>
64 struct transform_construct_from_matrix;
66 template<
typename TransformType>
struct transform_take_affine_part;
68 template<
typename Scalar_,
int Dim_,
int Mode_,
int Options_>
69 struct traits<Transform<Scalar_,Dim_,Mode_,Options_> >
71 typedef Scalar_ Scalar;
73 typedef Dense StorageKind;
75 Dim1 = Dim_==
Dynamic ? Dim_ : Dim_ + 1,
76 RowsAtCompileTime = Mode_==
Projective ? Dim1 : Dim_,
77 ColsAtCompileTime = Dim1,
78 MaxRowsAtCompileTime = RowsAtCompileTime,
79 MaxColsAtCompileTime = ColsAtCompileTime,
84 template<
int Mode>
struct transform_make_affine;
205 template<
typename Scalar_,
int Dim_,
int Mode_,
int Options_>
263 check_template_params();
269 check_template_params();
274 check_template_params();
277 template<
typename Derived>
280 check_template_params();
287 template<
typename OtherDerived>
291 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);
293 check_template_params();
294 internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(
this, other.
derived());
298 template<
typename OtherDerived>
302 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);
304 internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(
this, other.
derived());
308 template<
int OtherOptions>
311 check_template_params();
316 template<
int OtherMode,
int OtherOptions>
319 check_template_params();
323 YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)
328 YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)
339 m_matrix.template block<Dim,Dim+1>(0,0) = other.
matrix().template block<Dim,Dim+1>(0,0);
345 internal::transform_construct_from_matrix<OtherMatrixType,Mode,Options,Dim,HDim>::run(
this, other.
matrix());
357 template<
typename OtherDerived>
360 check_template_params();
364 template<
typename OtherDerived>
371 #ifdef EIGEN_QT_SUPPORT
372 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
375 inline QMatrix toQMatrix(
void)
const;
377 inline Transform(
const QTransform& other);
437 template<
typename OtherDerived>
438 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename internal::transform_right_product_impl<Transform, OtherDerived>::ResultType
440 {
return internal::transform_right_product_impl<Transform, OtherDerived>::run(*
this,other.
derived()); }
449 template<
typename OtherDerived>
friend
450 EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim_,Dim_+1>::ResultType
452 {
return internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim,HDim>::run(
a.derived(),
b); }
460 template<
typename DiagonalDerived>
465 res.linearExt() *=
b;
475 template<
typename DiagonalDerived>
480 res.linear().noalias() =
a*
b.linear();
481 res.translation().noalias() =
a*
b.translation();
483 res.matrix().row(Dim) =
b.matrix().row(Dim);
487 template<
typename OtherDerived>
493 return internal::transform_transform_product_impl<Transform,Transform>::run(*
this,other);
505 template<
int OtherMode,
int OtherOptions>
struct icc_11_workaround
507 typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;
508 typedef typename ProductType::ResultType ResultType;
513 template<
int OtherMode,
int OtherOptions>
514 inline typename icc_11_workaround<OtherMode,OtherOptions>::ResultType
515 operator * (
const Transform<Scalar,Dim,OtherMode,OtherOptions>& other)
const
517 typedef typename icc_11_workaround<OtherMode,OtherOptions>::ProductType ProductType;
518 return ProductType::run(*
this,other);
522 template<
int OtherMode,
int OtherOptions>
523 EIGEN_DEVICE_FUNC inline typename internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType
526 return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*
this,other);
542 template<
typename OtherDerived>
546 template<
typename OtherDerived>
553 template<
typename OtherDerived>
557 template<
typename OtherDerived>
561 template<
typename RotationType>
565 template<
typename RotationType>
596 template<
typename Derived>
598 template<
typename Derived>
600 template<
typename Derived>
606 template<
typename RotationMatrixType,
typename ScalingMatrixType>
609 template<
typename ScalingMatrixType,
typename RotationMatrixType>
613 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
631 template<
typename NewScalarType>
632 EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type
cast()
const
633 {
return typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type(*
this); }
636 template<
typename OtherScalarType>
639 check_template_params();
654 internal::transform_make_affine<int(Mode)>::run(
m_matrix);
662 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }
668 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }
675 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }
681 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }
684 #ifdef EIGEN_TRANSFORM_PLUGIN
685 #include EIGEN_TRANSFORM_PLUGIN
689 #ifndef EIGEN_PARSED_BY_DOXYGEN
738 #ifdef EIGEN_QT_SUPPORT
740 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
745 template<
typename Scalar,
int Dim,
int Mode,
int Options>
748 check_template_params();
756 template<
typename Scalar,
int Dim,
int Mode,
int Options>
761 m_matrix << other.m11(), other.m21(), other.dx(),
762 other.m12(), other.m22(), other.dy();
764 m_matrix << other.m11(), other.m21(), other.dx(),
765 other.m12(), other.m22(), other.dy(),
776 template<
typename Scalar,
int Dim,
int Mode,
int Options>
777 QMatrix Transform<Scalar,Dim,Mode,Options>::toQMatrix(
void)
const
779 check_template_params();
781 return QMatrix(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0),
791 template<
typename Scalar,
int Dim,
int Mode,
int Options>
794 check_template_params();
802 template<
typename Scalar,
int Dim,
int Mode,
int Options>
805 check_template_params();
808 m_matrix << other.m11(), other.m21(), other.dx(),
809 other.m12(), other.m22(), other.dy();
811 m_matrix << other.m11(), other.m21(), other.dx(),
812 other.m12(), other.m22(), other.dy(),
813 other.m13(), other.m23(), other.m33();
821 template<
typename Scalar,
int Dim,
int Mode,
int Options>
826 return QTransform(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0),
830 return QTransform(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0), m_matrix.
coeff(2,0),
844 template<
typename Scalar,
int Dim,
int Mode,
int Options>
845 template<
typename OtherDerived>
851 linearExt().noalias() = (linearExt() * other.
asDiagonal());
859 template<
typename Scalar,
int Dim,
int Mode,
int Options>
871 template<
typename Scalar,
int Dim,
int Mode,
int Options>
872 template<
typename OtherDerived>
878 affine().noalias() = (other.
asDiagonal() * affine());
886 template<
typename Scalar,
int Dim,
int Mode,
int Options>
890 m_matrix.template topRows<Dim>() *= s;
898 template<
typename Scalar,
int Dim,
int Mode,
int Options>
899 template<
typename OtherDerived>
904 translationExt() += linearExt() * other;
912 template<
typename Scalar,
int Dim,
int Mode,
int Options>
913 template<
typename OtherDerived>
919 affine() += other * m_matrix.row(Dim);
921 translation() += other;
942 template<
typename Scalar,
int Dim,
int Mode,
int Options>
943 template<
typename RotationType>
947 linearExt() *= internal::toRotationMatrix<Scalar,Dim>(rotation);
958 template<
typename Scalar,
int Dim,
int Mode,
int Options>
959 template<
typename RotationType>
963 m_matrix.template block<Dim,HDim>(0,0) = internal::toRotationMatrix<Scalar,Dim>(rotation)
964 * m_matrix.template block<Dim,HDim>(0,0);
973 template<
typename Scalar,
int Dim,
int Mode,
int Options>
979 VectorType tmp = linear().col(0)*sy + linear().col(1);
980 linear() << linear().col(0) + linear().col(1)*sx, tmp;
989 template<
typename Scalar,
int Dim,
int Mode,
int Options>
995 m_matrix.template block<Dim,HDim>(0,0) =
LinearMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);
1003 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1007 translation() = t.
vector();
1012 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1020 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1024 linear().diagonal().fill(s.
factor());
1029 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1030 template<
typename Derived>
1033 linear() = internal::toRotationMatrix<Scalar,Dim>(r);
1034 translation().setZero();
1039 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1040 template<
typename Derived>
1053 template<
int Mode>
struct transform_rotation_impl {
1054 template<
typename TransformType>
1056 const typename TransformType::LinearMatrixType run(
const TransformType& t)
1058 typedef typename TransformType::LinearMatrixType LinearMatrixType;
1059 LinearMatrixType result;
1060 t.computeRotationScaling(&result, (LinearMatrixType*)0);
1064 template<>
struct transform_rotation_impl<
Isometry> {
1065 template<
typename TransformType>
1067 typename TransformType::ConstLinearPart run(
const TransformType& t)
1083 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1088 return internal::transform_rotation_impl<Mode>::run(*
this);
1103 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1104 template<
typename RotationMatrixType,
typename ScalingMatrixType>
1113 if(scaling) *scaling =
svd.matrixV() * sv.asDiagonal() *
svd.matrixV().adjoint();
1118 *rotation =
m *
svd.matrixV().adjoint();
1133 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1134 template<
typename ScalingMatrixType,
typename RotationMatrixType>
1143 if(scaling) *scaling =
svd.matrixU() * sv.asDiagonal() *
svd.matrixU().adjoint();
1148 *rotation =
m *
svd.matrixV().adjoint();
1155 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1156 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
1161 linear() = internal::toRotationMatrix<Scalar,Dim>(orientation);
1163 translation() = position;
1171 struct transform_make_affine
1173 template<
typename MatrixType>
1176 static const int Dim = MatrixType::ColsAtCompileTime-1;
1177 mat.template block<1,Dim>(Dim,0).setZero();
1189 template<
typename TransformType,
int Mode=TransformType::Mode>
1190 struct projective_transform_inverse
1196 template<
typename TransformType>
1197 struct projective_transform_inverse<TransformType,
Projective>
1201 res.matrix() =
m.matrix().inverse();
1228 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1235 internal::projective_transform_inverse<Transform>::run(*
this,
res);
1241 res.matrix().template topLeftCorner<Dim,Dim>() = linear().transpose();
1245 res.matrix().template topLeftCorner<Dim,Dim>() = linear().inverse();
1249 eigen_assert(
false &&
"Invalid transform traits in Transform::Inverse");
1252 res.matrix().template topRightCorner<Dim,1>()
1253 = -
res.matrix().template topLeftCorner<Dim,Dim>() * translation();
1265 template<
typename TransformType>
struct transform_take_affine_part {
1267 typedef typename TransformType::AffinePart AffinePart;
1268 typedef typename TransformType::ConstAffinePart ConstAffinePart;
1270 {
return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }
1272 {
return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }
1275 template<
typename Scalar,
int Dim,
int Options>
1276 struct transform_take_affine_part<Transform<Scalar,Dim,
AffineCompact, Options> > {
1286 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1287 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,Dim>
1289 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1291 transform->linear() = other;
1292 transform->translation().setZero();
1293 transform->makeAffine();
1297 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1298 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,HDim>
1300 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1302 transform->affine() = other;
1303 transform->makeAffine();
1307 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1308 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, HDim,HDim>
1310 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1311 { transform->matrix() = other; }
1314 template<
typename Other,
int Options,
int Dim,
int HDim>
1315 struct transform_construct_from_matrix<Other,
AffineCompact,Options,Dim,HDim, HDim,HDim>
1317 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(Transform<typename Other::Scalar,Dim,AffineCompact,Options> *transform,
const Other& other)
1318 { transform->matrix() = other.template block<Dim,HDim>(0,0); }
1325 template<
int LhsMode,
int RhsMode>
1326 struct transform_product_result
1338 template<
typename TransformType,
typename MatrixType,
int RhsCols>
1339 struct transform_right_product_impl< TransformType,
MatrixType, 0, RhsCols>
1345 return T.matrix() * other;
1349 template<
typename TransformType,
typename MatrixType,
int RhsCols>
1350 struct transform_right_product_impl< TransformType,
MatrixType, 1, RhsCols>
1353 Dim = TransformType::Dim,
1354 HDim = TransformType::HDim,
1355 OtherRows = MatrixType::RowsAtCompileTime,
1356 OtherCols = MatrixType::ColsAtCompileTime
1365 typedef Block<ResultType, Dim, OtherCols, int(MatrixType::RowsAtCompileTime)==Dim> TopLeftLhs;
1367 ResultType
res(other.rows(),other.cols());
1368 TopLeftLhs(
res, 0, 0, Dim, other.cols()).noalias() =
T.affine() * other;
1369 res.row(OtherRows-1) = other.row(OtherRows-1);
1375 template<
typename TransformType,
typename MatrixType,
int RhsCols>
1376 struct transform_right_product_impl< TransformType,
MatrixType, 2, RhsCols>
1379 Dim = TransformType::Dim,
1380 HDim = TransformType::HDim,
1381 OtherRows = MatrixType::RowsAtCompileTime,
1382 OtherCols = MatrixType::ColsAtCompileTime
1391 typedef Block<ResultType, Dim, OtherCols, true> TopLeftLhs;
1392 ResultType
res(Replicate<typename TransformType::ConstTranslationPart, 1, OtherCols>(
T.translation(),1,other.cols()));
1393 TopLeftLhs(
res, 0, 0, Dim, other.cols()).noalias() +=
T.linear() * other;
1399 template<
typename TransformType,
typename MatrixType >
1400 struct transform_right_product_impl< TransformType,
MatrixType, 2, 1>
1404 Dim = TransformType::Dim,
1405 HDim = TransformType::HDim,
1406 OtherRows = MatrixType::RowsAtCompileTime,
1407 WorkingRows =
plain_enum_min(TransformMatrix::RowsAtCompileTime, HDim)
1416 Matrix<typename ResultType::Scalar, Dim+1, 1> rhs;
1417 rhs.template head<Dim>() = other; rhs[Dim] =
typename ResultType::Scalar(1);
1418 Matrix<typename ResultType::Scalar, WorkingRows, 1>
res(
T.matrix() * rhs);
1419 return res.template head<Dim>();
1428 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1429 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, HDim,HDim>
1431 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1433 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1434 static ResultType run(
const Other& other,
const TransformType& tr)
1435 {
return ResultType(other * tr.matrix()); }
1439 template<
typename Other,
int Options,
int Dim,
int HDim>
1440 struct transform_left_product_impl<Other,
AffineCompact,Options,Dim,HDim, HDim,HDim>
1442 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1444 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1445 static ResultType run(
const Other& other,
const TransformType& tr)
1448 res.matrix().noalias() = other.template block<HDim,Dim>(0,0) * tr.matrix();
1449 res.matrix().col(Dim) += other.col(Dim);
1455 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1456 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,HDim>
1458 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1460 typedef TransformType ResultType;
1461 static ResultType run(
const Other& other,
const TransformType& tr)
1464 res.affine().noalias() = other * tr.matrix();
1465 res.matrix().row(Dim) = tr.matrix().row(Dim);
1471 template<
typename Other,
int Options,
int Dim,
int HDim>
1472 struct transform_left_product_impl<Other,
AffineCompact,Options,Dim,HDim, Dim,HDim>
1474 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1476 typedef TransformType ResultType;
1477 static ResultType run(
const Other& other,
const TransformType& tr)
1480 res.matrix().noalias() = other.template block<Dim,Dim>(0,0) * tr.matrix();
1481 res.translation() += other.col(Dim);
1487 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1488 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,Dim>
1490 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1492 typedef TransformType ResultType;
1493 static ResultType run(
const Other& other,
const TransformType& tr)
1497 res.matrix().row(Dim) = tr.matrix().row(Dim);
1498 res.matrix().template topRows<Dim>().noalias()
1499 = other * tr.matrix().template topRows<Dim>();
1508 template<
typename Scalar,
int Dim,
int LhsMode,
int LhsOptions,
int RhsMode,
int RhsOptions>
1509 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,false >
1511 enum { ResultMode = transform_product_result<LhsMode,RhsMode>::Mode };
1512 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1513 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1514 typedef Transform<Scalar,Dim,ResultMode,LhsOptions> ResultType;
1515 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1518 res.linear() = lhs.linear() * rhs.linear();
1519 res.translation() = lhs.linear() * rhs.translation() + lhs.translation();
1525 template<
typename Scalar,
int Dim,
int LhsMode,
int LhsOptions,
int RhsMode,
int RhsOptions>
1526 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,true >
1528 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1529 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1530 typedef Transform<Scalar,Dim,Projective> ResultType;
1531 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1533 return ResultType( lhs.matrix() * rhs.matrix() );
1537 template<
typename Scalar,
int Dim,
int LhsOptions,
int RhsOptions>
1538 struct transform_transform_product_impl<Transform<Scalar,Dim,
AffineCompact,LhsOptions>,Transform<Scalar,Dim,
Projective,RhsOptions>,true >
1540 typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
1541 typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
1542 typedef Transform<Scalar,Dim,Projective> ResultType;
1543 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1546 res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();
1547 res.matrix().row(Dim) = rhs.matrix().row(Dim);
1552 template<
typename Scalar,
int Dim,
int LhsOptions,
int RhsOptions>
1553 struct transform_transform_product_impl<Transform<Scalar,Dim,
Projective,LhsOptions>,Transform<Scalar,Dim,
AffineCompact,RhsOptions>,true >
1555 typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
1556 typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
1557 typedef Transform<Scalar,Dim,Projective> ResultType;
1558 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1560 ResultType
res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());
1561 res.matrix().col(Dim) += lhs.matrix().col(Dim);
RowXpr row(Index i)
This is the const version of row(). */.
ColXpr col(Index i)
This is the const version of col().
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf, ComputeThinU|ComputeThinV > svd(m)
#define EIGEN_CONST_CONDITIONAL(cond)
#define EIGEN_DEVICE_FUNC
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
#define EIGEN_STATIC_ASSERT(X, MSG)
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Matrix< float, 1, Dynamic > MatrixType
Expression of a fixed-size or dynamic-size block.
internal::traits< Derived >::Scalar Scalar
bool isApprox(const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Base class for diagonal matrices and expressions.
Represents a diagonal matrix with its storage.
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Base class for all dense matrices, vectors, and expressions.
const DiagonalWrapper< const Derived > asDiagonal() const
static const IdentityReturnType Identity()
The matrix class, also used for vectors and row-vectors.
Base::PlainObject PlainObject
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
constexpr const Scalar & coeff(Index rowId, Index colId) const
const Scalar * data() const
Derived & setZero(Index size)
constexpr Scalar & coeffRef(Index rowId, Index colId)
void evalTo(Dest &dst) const
Common base class for compact rotation representations.
const Derived & derived() const
RotationMatrixType toRotationMatrix() const
Represents a translation transformation.
const VectorType & vector() const
Transform< float, 3, Projective > Projective3f
Transform< float, 2, Projective > Projective2f
Transform< float, 3, AffineCompact > AffineCompact3f
Transform< float, 3, Affine > Affine3f
Transform< double, 3, Projective > Projective3d
Transform< double, 2, Isometry > Isometry2d
Transform< double, 3, Isometry > Isometry3d
Transform< double, 2, AffineCompact > AffineCompact2d
Transform< float, 2, Isometry > Isometry2f
Transform< double, 3, Affine > Affine3d
Transform< double, 3, AffineCompact > AffineCompact3d
Transform< double, 2, Affine > Affine2d
Transform< double, 2, Projective > Projective2d
Transform< float, 3, Isometry > Isometry3f
Transform< float, 2, AffineCompact > AffineCompact2f
Transform< float, 2, Affine > Affine2f
const unsigned int RowMajorBit
constexpr int plain_enum_min(A a, B b)
constexpr bool check_implication(bool a, bool b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.