14#include "./InternalHeaderCheck.h"
20template <
typename Scalar>
21struct scalar_random_op {
22 inline const Scalar operator()()
const {
return random<Scalar>(); }
25template <
typename Scalar>
26struct functor_traits<scalar_random_op<Scalar> > {
27 enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess =
false, IsRepeatable =
false };
58template <
typename Derived>
60 return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());
87template <
typename Derived>
89 return NullaryExpr(size, internal::scalar_random_op<Scalar>());
111template <
typename Derived>
128template <
typename Derived>
130 return *
this =
Random(rows(), cols());
146template <
typename Derived>
167template <
typename Derived>
184template <
typename Derived>
200template <
typename Derived>
static const CwiseNullaryOp< CustomNullaryOp, PlainObject > NullaryExpr(Index rows, Index cols, const CustomNullaryOp &func)
Definition CwiseNullaryOp.h:112
@ ColsAtCompileTime
Definition DenseBase.h:102
@ RowsAtCompileTime
Definition DenseBase.h:96
Derived & setRandom()
Definition Random.h:129
static const RandomReturnType Random()
Definition Random.h:112
static const RandomReturnType Random(Index rows, Index cols)
Definition Random.h:59
Derived & setRandom(Index size)
Definition Random.h:147
constexpr void resize(Index rows, Index cols)
Definition PlainObjectBase.h:268
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82