Logo Search packages:      
Sourcecode: blender version File versions  Download package

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  )  [inline]

Resizes to the given size, and sets all coefficients in this expression to one.

Example:

Output:

See also:
MatrixBase::setOnes(), setOnes(int,int), class CwiseNullaryOp, MatrixBase::Ones()

Definition at line 544 of file CwiseNullaryOp.h.

References Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::resize(), and Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::setConstant().

{
  resize(size);
  return setConstant(Scalar(1));
}


Generated by  Doxygen 1.6.0   Back to index