28 template<
typename _Scalar,
int _Dim>
32 EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim)
57 inline Scaling(
const Scalar& sx,
const Scalar& sy)
64 inline Scaling(
const Scalar& sx,
const Scalar& sy,
const Scalar& sz)
72 explicit inline Scaling(
const VectorType& coeffs) : m_coeffs(coeffs) {}
74 const VectorType& coeffs()
const {
return m_coeffs; }
75 VectorType& coeffs() {
return m_coeffs; }
79 {
return Scaling(coeffs().cwise() * other.coeffs()); }
82 inline TransformType
operator* (
const TranslationType& t)
const;
85 inline TransformType
operator* (
const TransformType& t)
const;
89 inline LinearMatrixType
operator* (
const LinearMatrixType& other)
const 90 {
return coeffs().asDiagonal() * other; }
94 friend inline LinearMatrixType
operator* (
const LinearMatrixType& other,
const Scaling& s)
95 {
return other * s.coeffs().asDiagonal(); }
97 template<
typename Derived>
102 inline VectorType
operator* (
const VectorType& other)
const 103 {
return coeffs().asDiagonal() * other; }
111 m_coeffs = other.m_coeffs;
120 template<
typename NewScalarType>
125 template<
typename OtherScalarType>
127 { m_coeffs = other.coeffs().template cast<Scalar>(); }
134 {
return m_coeffs.isApprox(other.m_coeffs, prec); }
146 template<
typename Scalar,
int Dim>
152 res.
linear().diagonal() = coeffs();
158 template<
typename Scalar,
int Dim>
162 TransformType res = t;
163 res.prescale(m_coeffs);
Definition: XprHelper.h:393
internal::cast_return_type< Scaling, Scaling< NewScalarType, Dim > >::type cast() const
Definition: Scaling.h:121
Scaling(const VectorType &coeffs)
Constructs and initialize the scaling transformation from a vector of scaling coefficients.
Definition: Scaling.h:72
Matrix< Scalar, Dim, Dim > LinearMatrixType
corresponding linear transformation matrix type
Definition: Scaling.h:40
Scaling(const Scalar &sx, const Scalar &sy)
2D only
Definition: Scaling.h:57
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
RotationMatrixType toRotationMatrix() const
Definition: RotationBase.h:39
Definition: ForwardDeclarations.h:236
bool isApprox(const Scaling &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
Definition: Scaling.h:133
Translation< Scalar, Dim > TranslationType
corresponding translation type
Definition: Scaling.h:42
Transform< Scalar, Dim > TransformType
corresponding affine transformation type
Definition: Scaling.h:44
Common base class for compact rotation representations.
Definition: ForwardDeclarations.h:231
Scaling inverse() const
Definition: Scaling.h:106
Matrix< Scalar, Dim, 1 > VectorType
corresponding vector type
Definition: Scaling.h:38
Derived & setZero(Index size)
Resizes to the given size, and sets all coefficients in this expression to zero.
Definition: CwiseNullaryOp.h:515
Scaling(const Scalar &s)
Constructs and initialize a uniform scaling transformation.
Definition: Scaling.h:55
Derived & setConstant(Index size, const Scalar &value)
Resizes to the given size, and sets all coefficients in this expression to the given value...
Definition: CwiseNullaryOp.h:348
Scaling(const Scalar &sx, const Scalar &sy, const Scalar &sz)
3D only
Definition: Scaling.h:64
Scaling operator*(const Scaling &other) const
Concatenates two scaling.
Definition: Scaling.h:78
Scaling()
Default constructor without initialization.
Definition: Scaling.h:53
_Scalar Scalar
the scalar type of the coefficients
Definition: Scaling.h:36
Scaling(const Scaling< OtherScalarType, Dim > &other)
Copy constructor with scalar type conversion.
Definition: Scaling.h:126