- many updates after Cwise change

- fix compilation in product.cpp with std::complex
- fix bug in MatrixBase::operator!=
This commit is contained in:
Benoit Jacob
2008-07-08 07:56:01 +00:00
parent f5791eeb70
commit 6f09d3a67d
21 changed files with 40 additions and 56 deletions

View File

@@ -35,7 +35,7 @@
* \param Rhs the type of the right-hand side
*
* This class represents an expression of a generic binary operator of two matrices or vectors.
* It is the return type of the operator+, operator-, cwiseProduct, cwiseQuotient between matrices or vectors, and most
* It is the return type of the operator+, operator-, and the Cwise methods, and most
* of the time this is the only way it is used.
*
* However, if you want to write a function returning such an expression, you
@@ -232,7 +232,7 @@ Cwise<ExpressionType>::max(const MatrixBase<OtherDerived> &other) const
* \include class_CwiseBinaryOp.cpp
* Output: \verbinclude class_CwiseBinaryOp.out
*
* \sa class CwiseBinaryOp, MatrixBase::operator+, MatrixBase::operator-, MatrixBase::cwiseProduct, MatrixBase::cwiseQuotient
* \sa class CwiseBinaryOp, MatrixBase::operator+, MatrixBase::operator-, Cwise::operator*, Cwise::operator/
*/
template<typename Derived>
template<typename CustomBinaryOp, typename OtherDerived>

View File

@@ -113,7 +113,7 @@ class CwiseUnaryOp : ei_no_assignment_operator,
* \include class_CwiseUnaryOp.cpp
* Output: \verbinclude class_CwiseUnaryOp.out
*
* \sa class CwiseUnaryOp, class CwiseBinarOp, MatrixBase::operator-, MatrixBase::cwiseAbs
* \sa class CwiseUnaryOp, class CwiseBinarOp, MatrixBase::operator-, Cwise::abs
*/
template<typename Derived>
template<typename CustomUnaryOp>

View File

@@ -49,7 +49,7 @@ struct ei_functor_traits<ei_scalar_sum_op<Scalar> > {
/** \internal
* \brief Template functor to compute the product of two scalars
*
* \sa class CwiseBinaryOp, MatrixBase::cwiseProduct(), class PartialRedux, MatrixBase::redux()
* \sa class CwiseBinaryOp, Cwise::operator*(), class PartialRedux, MatrixBase::redux()
*/
template<typename Scalar> struct ei_scalar_product_op EIGEN_EMPTY_STRUCT {
inline const Scalar operator() (const Scalar& a, const Scalar& b) const { return a * b; }
@@ -128,7 +128,7 @@ struct ei_functor_traits<ei_scalar_difference_op<Scalar> > {
/** \internal
* \brief Template functor to compute the quotient of two scalars
*
* \sa class CwiseBinaryOp, MatrixBase::cwiseQuotient()
* \sa class CwiseBinaryOp, Cwise::operator/()
*/
template<typename Scalar> struct ei_scalar_quotient_op EIGEN_EMPTY_STRUCT {
inline const Scalar operator() (const Scalar& a, const Scalar& b) const { return a / b; }
@@ -161,7 +161,7 @@ struct ei_functor_traits<ei_scalar_opposite_op<Scalar> >
/** \internal
* \brief Template functor to compute the absolute value of a scalar
*
* \sa class CwiseUnaryOp, MatrixBase::cwiseAbs
* \sa class CwiseUnaryOp, Cwise::abs
*/
template<typename Scalar> struct ei_scalar_abs_op EIGEN_EMPTY_STRUCT {
typedef typename NumTraits<Scalar>::Real result_type;
@@ -179,7 +179,7 @@ struct ei_functor_traits<ei_scalar_abs_op<Scalar> >
/** \internal
* \brief Template functor to compute the squared absolute value of a scalar
*
* \sa class CwiseUnaryOp, MatrixBase::cwiseAbs2
* \sa class CwiseUnaryOp, Cwise::abs2
*/
template<typename Scalar> struct ei_scalar_abs2_op EIGEN_EMPTY_STRUCT {
typedef typename NumTraits<Scalar>::Real result_type;

View File

@@ -30,7 +30,8 @@
* \brief Base class for all matrices, vectors, and expressions
*
* This class is the base that is inherited by all matrix, vector, and expression
* types. Most of the Eigen API is contained in this class.
* types. Most of the Eigen API is contained in this class. Other important classes for
* the Eigen API are Matrix, Cwise, and Part.
*
* \param Derived is the derived type, e.g. a matrix type, or an expression, etc.
*
@@ -422,11 +423,11 @@ template<typename Derived> class MatrixBase
template<typename OtherDerived>
inline bool operator==(const MatrixBase<OtherDerived>& other) const
{ return derived().cwiseEqualTo(other.derived()).all(); }
{ return (cwise() == other).all(); }
template<typename OtherDerived>
inline bool operator!=(const MatrixBase<OtherDerived>& other) const
{ return derived().cwiseNotEqualTo(other.derived()).all(); }
{ return (cwise() != other).any(); }
template<typename NewType>