fix cross product for complexes and add support for mixed real-complex cross products

This commit is contained in:
Gael Guennebaud
2011-01-27 11:33:37 +01:00
parent 0bfb78c824
commit e8d6a5ca87
3 changed files with 34 additions and 15 deletions

View File

@@ -399,8 +399,16 @@ template<typename Derived> class MatrixBase
/////////// Geometry module ///////////
#ifndef EIGEN_PARSED_BY_DOXYGEN
/// \internal helper struct to form the return type of the cross product
template<typename OtherDerived> struct cross_product_return_type {
typedef typename internal::scalar_product_traits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType Scalar;
typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> type;
};
#endif // EIGEN_PARSED_BY_DOXYGEN
template<typename OtherDerived>
PlainObject cross(const MatrixBase<OtherDerived>& other) const;
typename cross_product_return_type<OtherDerived>::type
cross(const MatrixBase<OtherDerived>& other) const;
template<typename OtherDerived>
PlainObject cross3(const MatrixBase<OtherDerived>& other) const;
PlainObject unitOrthogonal(void) const;