From fbdf16d42534f4bd03e90cfff4a3e466bc048c6b Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Fri, 19 Mar 2010 20:11:40 +0100 Subject: [PATCH 1/2] Added x()/y() and z() access functions to translations. --- Eigen/src/Geometry/Translation.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h index bde72c738..60c12caea 100644 --- a/Eigen/src/Geometry/Translation.h +++ b/Eigen/src/Geometry/Translation.h @@ -81,6 +81,20 @@ public: /** Constructs and initialize the translation transformation from a vector of translation coefficients */ explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {} + /** \brief Retruns the x-translation by value. **/ + inline Scalar x() const { return m_coeffs.x(); } + /** \brief Retruns the y-translation by value. **/ + inline Scalar y() const { return m_coeffs.y(); } + /** \brief Retruns the z-translation by value. **/ + inline Scalar z() const { return m_coeffs.z(); } + + /** \brief Retruns the x-translation as a reference. **/ + inline Scalar& x() { return m_coeffs.x(); } + /** \brief Retruns the y-translation as a reference. **/ + inline Scalar& y() { return m_coeffs.y(); } + /** \brief Retruns the z-translation as a reference. **/ + inline Scalar& z() { return m_coeffs.z(); } + const VectorType& vector() const { return m_coeffs; } VectorType& vector() { return m_coeffs; } From 8b093dd2df07ea204e6e3402db829ca4669faf95 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 20 Mar 2010 20:51:44 +0100 Subject: [PATCH 2/2] oops, fix symv (innerStride instead of outerStride) --- Eigen/src/Core/products/SelfadjointMatrixVector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/products/SelfadjointMatrixVector.h b/Eigen/src/Core/products/SelfadjointMatrixVector.h index 627c06801..0f829fd73 100644 --- a/Eigen/src/Core/products/SelfadjointMatrixVector.h +++ b/Eigen/src/Core/products/SelfadjointMatrixVector.h @@ -186,10 +186,11 @@ struct SelfadjointProductMatrix * RhsBlasTraits::extractScalarFactor(m_rhs); ei_assert(dst.innerStride()==1 && "not implemented yet"); + ei_product_selfadjoint_vector::Flags&RowMajorBit) ? RowMajor : ColMajor, int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)> ( lhs.rows(), // size - &lhs.coeff(0,0), lhs.innerStride(), // lhs info + &lhs.coeff(0,0), lhs.outerStride(), // lhs info &rhs.coeff(0), rhs.innerStride(), // rhs info &dst.coeffRef(0), // result info actualAlpha // scale factor