17template<
typename Scalar>
struct scalar_random_op {
18 EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op)
19 inline const Scalar operator() ()
const {
return random<Scalar>(); }
22template<
typename Scalar>
23struct functor_traits<scalar_random_op<Scalar> >
24{
enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess =
false, IsRepeatable =
false }; };
54template<
typename Derived>
55inline const typename DenseBase<Derived>::RandomReturnType
58 return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());
85template<
typename Derived>
89 return NullaryExpr(size, internal::scalar_random_op<Scalar>());
111template<
typename Derived>
115 return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op<Scalar>());
130template<
typename Derived>
133 return *
this = Random(rows(), cols());
149template<
typename Derived>
150EIGEN_STRONG_INLINE Derived&
172template<
typename Derived>
173EIGEN_STRONG_INLINE Derived&
191template<
typename Derived>
192EIGEN_STRONG_INLINE Derived&
195 return setRandom(rows(), cols);
209template<
typename Derived>
210EIGEN_STRONG_INLINE Derived&
213 return setRandom(rows, cols());
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:61
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
Dense storage base class for matrices and arrays.
Definition: PlainObjectBase.h:100
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74