* rename PartialRedux to VectorwiseOp

* add VectorwiseOp's +, -, +=, -= operators
This commit is contained in:
Gael Guennebaud
2009-06-10 11:20:30 +02:00
parent f3fd7fd22b
commit 627595ad19
13 changed files with 174 additions and 52 deletions

View File

@@ -147,13 +147,13 @@ MatrixBase<Derived>::homogeneous() const
* \nonstableyet
* \returns a matrix expression of homogeneous column (or row) vectors
*
* Example: \include PartialRedux_homogeneous.cpp
* Output: \verbinclude PartialRedux_homogeneous.out
* Example: \include VectorwiseOp_homogeneous.cpp
* Output: \verbinclude VectorwiseOp_homogeneous.out
*
* \sa MatrixBase::homogeneous() */
template<typename ExpressionType, int Direction>
inline const Homogeneous<ExpressionType,Direction>
PartialRedux<ExpressionType,Direction>::homogeneous() const
VectorwiseOp<ExpressionType,Direction>::homogeneous() const
{
return _expression();
}
@@ -165,7 +165,7 @@ PartialRedux<ExpressionType,Direction>::homogeneous() const
* Example: \include MatrixBase_hnormalized.cpp
* Output: \verbinclude MatrixBase_hnormalized.out
*
* \sa PartialRedux::hnormalized() */
* \sa VectorwiseOp::hnormalized() */
template<typename Derived>
inline const typename MatrixBase<Derived>::HNormalizedReturnType
MatrixBase<Derived>::hnormalized() const
@@ -185,8 +185,8 @@ MatrixBase<Derived>::hnormalized() const
*
* \sa MatrixBase::hnormalized() */
template<typename ExpressionType, int Direction>
inline const typename PartialRedux<ExpressionType,Direction>::HNormalizedReturnType
PartialRedux<ExpressionType,Direction>::hnormalized() const
inline const typename VectorwiseOp<ExpressionType,Direction>::HNormalizedReturnType
VectorwiseOp<ExpressionType,Direction>::hnormalized() const
{
return HNormalized_Block(_expression(),0,0,
Direction==Vertical ? _expression().rows()-1 : _expression().rows(),

View File

@@ -105,8 +105,8 @@ MatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const
* \sa MatrixBase::cross() */
template<typename ExpressionType, int Direction>
template<typename OtherDerived>
const typename PartialRedux<ExpressionType,Direction>::CrossReturnType
PartialRedux<ExpressionType,Direction>::cross(const MatrixBase<OtherDerived>& other) const
const typename VectorwiseOp<ExpressionType,Direction>::CrossReturnType
VectorwiseOp<ExpressionType,Direction>::cross(const MatrixBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,3)
EIGEN_STATIC_ASSERT((ei_is_same_type<Scalar, typename OtherDerived::Scalar>::ret),

View File

@@ -205,7 +205,7 @@ public:
* If Mode==Affine, then the last row is set to [0 ... 0 1] */
inline Transform()
{
if (Mode==Affine)
if (int(Mode)==Affine)
makeAffine();
}