15#include "./InternalHeaderCheck.h"
21template <
typename Scalar>
22struct scalar_random_op {
23 inline Scalar operator()()
const {
return random<Scalar>(); }
26template <
typename Scalar>
27struct functor_traits<scalar_random_op<Scalar> > {
28 enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess =
false, IsRepeatable =
false };
59template <
typename Derived>
61 return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());
88template <
typename Derived>
90 return NullaryExpr(size, internal::scalar_random_op<Scalar>());
112template <
typename Derived>
129template <
typename Derived>
131 return *
this =
Random(rows(), cols());
147template <
typename Derived>
168template <
typename Derived>
185template <
typename Derived>
201template <
typename Derived>
static const CwiseNullaryOp< CustomNullaryOp, PlainObject > NullaryExpr(Index rows, Index cols, const CustomNullaryOp &func)
Definition CwiseNullaryOp.h:113
@ ColsAtCompileTime
Definition DenseBase.h:103
@ RowsAtCompileTime
Definition DenseBase.h:97
Derived & setRandom()
Definition Random.h:130
static const RandomReturnType Random()
Definition Random.h:113
static const RandomReturnType Random(Index rows, Index cols)
Definition Random.h:60
Derived & setRandom(Index size)
Definition Random.h:148
constexpr void resize(Index rows, Index cols)
Definition PlainObjectBase.h:282