some cleaning in DenseStorageBase

This commit is contained in:
Gael Guennebaud
2009-12-17 13:56:33 +01:00
parent ebb2878829
commit 5ca90e1b0c
5 changed files with 78 additions and 148 deletions

View File

@@ -278,13 +278,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setConstant(const Scalar& value
*
* \sa MatrixBase::setConstant(const Scalar&), setConstant(int,int,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setConstant(int size, const Scalar& value)
// {
// resize(size);
// return setConstant(value);
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setConstant(int size, const Scalar& value)
{
resize(size);
return setConstant(value);
}
/** Resizes to the given size, and sets all coefficients in this expression to the given \a value.
*
@@ -296,13 +296,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setConstant(const Scalar& value
*
* \sa MatrixBase::setConstant(const Scalar&), setConstant(int,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setConstant(int rows, int cols, const Scalar& value)
// {
// resize(rows, cols);
// return setConstant(value);
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setConstant(int rows, int cols, const Scalar& value)
{
resize(rows, cols);
return setConstant(value);
}
// zero:
@@ -408,13 +408,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setZero()
*
* \sa DenseBase::setZero(), setZero(int,int), class CwiseNullaryOp, DenseBase::Zero()
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setZero(int size)
// {
// resize(size);
// return setConstant(Scalar(0));
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setZero(int size)
{
resize(size);
return setConstant(Scalar(0));
}
/** Resizes to the given size, and sets all coefficients in this expression to zero.
*
@@ -426,13 +426,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setZero()
*
* \sa DenseBase::setZero(), setZero(int), class CwiseNullaryOp, DenseBase::Zero()
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setZero(int rows, int cols)
// {
// resize(rows, cols);
// return setConstant(Scalar(0));
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setZero(int rows, int cols)
{
resize(rows, cols);
return setConstant(Scalar(0));
}
// ones:
@@ -534,13 +534,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setOnes()
*
* \sa MatrixBase::setOnes(), setOnes(int,int), class CwiseNullaryOp, MatrixBase::Ones()
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setOnes(int size)
// {
// resize(size);
// return setConstant(Scalar(1));
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setOnes(int size)
{
resize(size);
return setConstant(Scalar(1));
}
/** Resizes to the given size, and sets all coefficients in this expression to one.
*
@@ -552,13 +552,13 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setOnes()
*
* \sa MatrixBase::setOnes(), setOnes(int), class CwiseNullaryOp, MatrixBase::Ones()
*/
// template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
// EIGEN_STRONG_INLINE Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
// Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::setOnes(int rows, int cols)
// {
// resize(rows, cols);
// return setConstant(Scalar(1));
// }
template<typename Derived, template<typename> class _Base, int _Options>
EIGEN_STRONG_INLINE Derived&
DenseStorageBase<Derived,_Base,_Options>::setOnes(int rows, int cols)
{
resize(rows, cols);
return setConstant(Scalar(1));
}
// Identity: