* 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

@@ -54,6 +54,8 @@
*/
template<typename Scalar, typename Derived> class MatrixBase
{
struct CommaInitializer;
public:
/** \brief Some traits provided by the Derived type.
@@ -166,7 +168,6 @@ template<typename Scalar, typename Derived> class MatrixBase
AsArg asArg() const
{ return static_cast<const Derived *>(this)->_asArg(); }
//@{
/** Copies \a other into *this. \returns a reference to *this. */
template<typename OtherDerived>
Derived& operator=(const MatrixBase<Scalar, OtherDerived>& other);
@@ -179,6 +180,8 @@ template<typename Scalar, typename Derived> class MatrixBase
return this->operator=<Derived>(other);
}
CommaInitializer operator<< (const Scalar& s);
/** swaps *this with the expression \a other.
*
* \note \a other is only marked const because I couln't find another way
@@ -187,7 +190,6 @@ template<typename Scalar, typename Derived> class MatrixBase
*/
template<typename OtherDerived>
void swap(const MatrixBase<Scalar, OtherDerived>& other);
//@}
/// \name sub-matrices
//@{