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

template<typename Derived >
EIGEN_STRONG_INLINE Derived & PlainObjectBase< Derived >::setOnes ( Index  size)

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

Example:

Output:

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

Definition at line 630 of file CwiseNullaryOp.h.

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

Generated by  Doxygen 1.6.0   Back to index