10 #ifndef EIGEN_RANDOM_H
11 #define EIGEN_RANDOM_H
19 template<
typename Scalar>
struct scalar_random_op {
20 inline const Scalar
operator() ()
const {
return random<Scalar>(); }
23 template<
typename Scalar>
24 struct functor_traits<scalar_random_op<Scalar> >
55 template<
typename Derived>
59 return NullaryExpr(
rows,
cols, internal::scalar_random_op<Scalar>());
86 template<
typename Derived>
90 return NullaryExpr(
size, internal::scalar_random_op<Scalar>());
112 template<
typename Derived>
116 return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op<Scalar>());
131 template<
typename Derived>
134 return *
this = Random(
rows(),
cols());
150 template<
typename Derived>
151 EIGEN_STRONG_INLINE Derived&
173 template<
typename Derived>
174 EIGEN_STRONG_INLINE Derived&
192 template<
typename Derived>
193 EIGEN_STRONG_INLINE Derived&
210 template<
typename Derived>
211 EIGEN_STRONG_INLINE Derived&
IndexedView_or_Block operator()(const RowIndices &rowIndices, const ColIndices &colIndices)
#define EIGEN_DEVICE_FUNC
Generic expression of a matrix where all coefficients are defined by a functor.
CwiseNullaryOp< internal::scalar_random_op< Scalar >, PlainObject > RandomReturnType
static const RandomReturnType Random()
Derived & setRandom(Index size)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Eigen::Index Index
The interface type of indices.