13#include "./InternalHeaderCheck.h"
19template<
typename Scalar>
struct scalar_random_op {
20 EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op)
21 inline const Scalar operator() ()
const {
return random<Scalar>(); }
24template<
typename Scalar>
25struct functor_traits<scalar_random_op<Scalar> >
26{
enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess =
false, IsRepeatable =
false }; };
56template<
typename Derived>
57inline const typename DenseBase<Derived>::RandomReturnType
60 return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());
87template<
typename Derived>
91 return NullaryExpr(size, internal::scalar_random_op<Scalar>());
113template<
typename Derived>
117 return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op<Scalar>());
132template<
typename Derived>
135 return *
this = Random(rows(), cols());
151template<
typename Derived>
152EIGEN_STRONG_INLINE Derived&
174template<
typename Derived>
175EIGEN_STRONG_INLINE Derived&
193template<
typename Derived>
194EIGEN_STRONG_INLINE Derived&
197 return setRandom(rows(), cols);
211template<
typename Derived>
212EIGEN_STRONG_INLINE Derived&
215 return setRandom(rows, cols());
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:63
Derived & setRandom()
Definition: Random.h:133
static const RandomReturnType Random()
Definition: Random.h:115
Derived & setRandom(Index size)
Definition: Random.h:153
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:59
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:41