mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* 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:
@@ -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
|
||||
//@{
|
||||
|
||||
Reference in New Issue
Block a user