* Added support for a comma initializer: mat.block(i,j,2,2) << 1, 2, 3, 4;

If the number of coefficients does not match the matrix size, then an assertion is raised.
  No support for xpr on the right side for the moment.

* Added support for assertion checking. This allows to test that an assertion is indeed raised
  when it should be.

* Fixed a mistake in the CwiseUnary example.
This commit is contained in:
Gael Guennebaud
2008-03-08 19:02:24 +00:00
parent 138aad0ed0
commit 721626dfc5
13 changed files with 259 additions and 67 deletions

View File

@@ -76,7 +76,8 @@ class CwiseUnaryOp : NoOperatorEquals,
const UnaryOp m_functor;
};
/** \brief Template functor to compute the opposite of a scalar
/** \internal
* \brief Template functor to compute the opposite of a scalar
*
* \sa class CwiseUnaryOp, MatrixBase::operator-
*/
@@ -84,7 +85,8 @@ struct ScalarOppositeOp EIGEN_EMPTY_STRUCT {
template<typename Scalar> Scalar operator() (const Scalar& a) const { return -a; }
};
/** \brief Template functor to compute the absolute value of a scalar
/** \internal
* \brief Template functor to compute the absolute value of a scalar
*
* \sa class CwiseUnaryOp, MatrixBase::cwiseAbs
*/
@@ -116,7 +118,7 @@ MatrixBase<Scalar, Derived>::cwiseAbs() const
*
* The template parameter \a CustomUnaryOp is the type of the functor
* of the custom unary operator.
*
*
* Here is an example:
* \include class_CwiseUnaryOp.cpp
*
@@ -131,7 +133,8 @@ MatrixBase<Scalar, Derived>::cwise(const CustomUnaryOp& func) const
}
/** \brief Template functor to compute the conjugate of a complex value
/** \internal
* \brief Template functor to compute the conjugate of a complex value
*
* \sa class CwiseUnaryOp, MatrixBase::conjugate()
*/
@@ -149,7 +152,8 @@ MatrixBase<Scalar, Derived>::conjugate() const
return CwiseUnaryOp<ScalarConjugateOp, Derived>(asArg());
}
/** \brief Template functor to cast a scalar to another
/** \internal
* \brief Template functor to cast a scalar to another
*
* \sa class CwiseUnaryOp, MatrixBase::cast()
*/
@@ -178,7 +182,8 @@ MatrixBase<Scalar, Derived>::cast() const
}
/** \brief Template functor to multiply a scalar by a fixed another one
/** \internal
* \brief Template functor to multiply a scalar by a fixed another one
*
* \sa class CwiseUnaryOp, MatrixBase::operator*, MatrixBase::operator/
*/