-add set...() methods and their documentation; remove Generic

-use row-major traversal when the number of columns is fixed
 and the number of rows is dynamic
-other minor changes
This commit is contained in:
Benoit Jacob
2008-01-11 15:08:04 +00:00
parent aae0667e1e
commit e092cbc75c
20 changed files with 112 additions and 26 deletions

View File

@@ -64,7 +64,7 @@ template<typename MatrixType> class Zero : NoOperatorEquals,
}
protected:
int m_rows, m_cols;
const int m_rows, m_cols;
};
/** \returns an expression of a zero matrix.
@@ -146,4 +146,17 @@ bool MatrixBase<Scalar, Derived>::isZero
return true;
}
/** Sets all coefficients in this expression to zero.
*
* Example: \include MatrixBase_setZero.cpp
* Output: \verbinclude MatrixBase_setZero.out
*
* \sa class Zero, zero()
*/
template<typename Scalar, typename Derived>
Derived& MatrixBase<Scalar, Derived>::setZero()
{
return *this = Zero<Derived>(rows(), cols());
}
#endif // EIGEN_ZERO_H