From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- Eigen/src/Core/Random.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'Eigen/src/Core/Random.h') diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h index 3c3dc45ab..b7d90103a 100644 --- a/Eigen/src/Core/Random.h +++ b/Eigen/src/Core/Random.h @@ -25,15 +25,20 @@ #ifndef EIGEN_RANDOM_H #define EIGEN_RANDOM_H -template struct ei_scalar_random_op { - EIGEN_EMPTY_STRUCT_CTOR(ei_scalar_random_op) +namespace internal { + +template struct scalar_random_op { + EIGEN_EMPTY_STRUCT_CTOR(scalar_random_op) template - inline const Scalar operator() (Index, Index = 0) const { return ei_random(); } + inline const Scalar operator() (Index, Index = 0) const { return random(); } }; + template -struct ei_functor_traits > +struct functor_traits > { enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false, IsRepeatable = false }; }; +} // end namespace internal + /** \returns a random matrix expression * * The parameters \a rows and \a cols are the number of rows and of columns of @@ -53,10 +58,10 @@ struct ei_functor_traits > * \sa MatrixBase::setRandom(), MatrixBase::Random(Index), MatrixBase::Random() */ template -inline const CwiseNullaryOp::Scalar>, Derived> +inline const CwiseNullaryOp::Scalar>, Derived> DenseBase::Random(Index rows, Index cols) { - return NullaryExpr(rows, cols, ei_scalar_random_op()); + return NullaryExpr(rows, cols, internal::scalar_random_op()); } /** \returns a random vector expression @@ -80,10 +85,10 @@ DenseBase::Random(Index rows, Index cols) * \sa MatrixBase::setRandom(), MatrixBase::Random(Index,Index), MatrixBase::Random() */ template -inline const CwiseNullaryOp::Scalar>, Derived> +inline const CwiseNullaryOp::Scalar>, Derived> DenseBase::Random(Index size) { - return NullaryExpr(size, ei_scalar_random_op()); + return NullaryExpr(size, internal::scalar_random_op()); } /** \returns a fixed-size random matrix or vector expression @@ -101,10 +106,10 @@ DenseBase::Random(Index size) * \sa MatrixBase::setRandom(), MatrixBase::Random(Index,Index), MatrixBase::Random(Index) */ template -inline const CwiseNullaryOp::Scalar>, Derived> +inline const CwiseNullaryOp::Scalar>, Derived> DenseBase::Random() { - return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_random_op()); + return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op()); } /** Sets all coefficients in this expression to random values. -- cgit v1.2.3