diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-01-28 12:35:32 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-01-28 12:35:32 +0100 |
commit | af712e80e6572a8fa1a8599dd98796b722052650 (patch) | |
tree | fb63ba0b26f102ce01a0c4c001a0bba4fe273dde /Eigen/src/Householder/HouseholderSequence.h | |
parent | d76ed18a9f941eacab40c9c3d143791d109f5cd7 (diff) |
fix bug #73: weird compilation error in HouseholderSequence where double and float were mixed. Hopefuly this also solve bug #91...
Diffstat (limited to 'Eigen/src/Householder/HouseholderSequence.h')
-rw-r--r-- | Eigen/src/Householder/HouseholderSequence.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index 2acf86379..717f29c99 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -317,28 +317,11 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type operator*(const MatrixBase<OtherDerived>& other) const { typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type - res(other.template cast<typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::ResultScalar>()); + res(other.template cast<typename internal::matrix_type_times_scalar_type<Scalar,OtherDerived>::ResultScalar>()); applyThisOnTheLeft(res); return res; } - /** \brief Computes the product of a matrix with a Householder sequence. - * \param[in] other %Matrix being multiplied. - * \param[in] h %HouseholderSequence being multiplied. - * \returns Expression object representing the product. - * - * This function computes \f$ MH \f$ where \f$ M \f$ is the matrix \p other and \f$ H \f$ is the - * Householder sequence represented by \p h. - */ - template<typename OtherDerived> friend - typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type operator*(const MatrixBase<OtherDerived>& other, const HouseholderSequence& h) - { - typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::Type - res(other.template cast<typename internal::matrix_type_times_scalar_type<Scalar, OtherDerived>::ResultScalar>()); - h.applyThisOnTheRight(res); - return res; - } - template<typename _VectorsType, typename _CoeffsType, int _Side> friend struct internal::hseq_side_dependent_impl; /** \brief Sets the length of the Householder sequence. @@ -404,6 +387,23 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS Index m_shift; }; +/** \brief Computes the product of a matrix with a Householder sequence. + * \param[in] other %Matrix being multiplied. + * \param[in] h %HouseholderSequence being multiplied. + * \returns Expression object representing the product. + * + * This function computes \f$ MH \f$ where \f$ M \f$ is the matrix \p other and \f$ H \f$ is the + * Householder sequence represented by \p h. + */ +template<typename OtherDerived, typename VectorsType, typename CoeffsType, int Side> +typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type operator*(const MatrixBase<OtherDerived>& other, const HouseholderSequence<VectorsType,CoeffsType,Side>& h) +{ + typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type + res(other.template cast<typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::ResultScalar>()); + h.applyThisOnTheRight(res); + return res; +} + /** \ingroup Householder_Module \householder_module * \brief Convenience function for constructing a Householder sequence. * \returns A HouseholderSequence constructed from the specified arguments. |