Clean namespace pollution.

This commit is contained in:
Chen-Pang He 2013-06-25 02:56:30 +08:00
parent b9543ce237
commit 7b6e94fb58

View File

@ -12,16 +12,14 @@
namespace Eigen { namespace Eigen {
namespace MatrixPowerHelper {
template<typename MatrixPowerType> template<typename MatrixPowerType>
class ReturnValue : public ReturnByValue< ReturnValue<MatrixPowerType> > class MatrixPowerRetval : public ReturnByValue< MatrixPowerRetval<MatrixPowerType> >
{ {
public: public:
typedef typename MatrixPowerType::PlainObject::RealScalar RealScalar; typedef typename MatrixPowerType::PlainObject::RealScalar RealScalar;
typedef typename MatrixPowerType::PlainObject::Index Index; typedef typename MatrixPowerType::PlainObject::Index Index;
ReturnValue(MatrixPowerType& pow, RealScalar p) : m_pow(pow), m_p(p) MatrixPowerRetval(MatrixPowerType& pow, RealScalar p) : m_pow(pow), m_p(p)
{ } { }
template<typename ResultType> template<typename ResultType>
@ -34,11 +32,9 @@ class ReturnValue : public ReturnByValue< ReturnValue<MatrixPowerType> >
private: private:
MatrixPowerType& m_pow; MatrixPowerType& m_pow;
const RealScalar m_p; const RealScalar m_p;
ReturnValue& operator=(const ReturnValue&); MatrixPowerRetval& operator=(const MatrixPowerRetval&);
}; };
} // namespace MatrixPowerHelper
template<typename MatrixType> template<typename MatrixType>
class MatrixPowerAtomic class MatrixPowerAtomic
{ {
@ -301,8 +297,8 @@ class MatrixPowerTriangular
* \return The expression \f$ A^p \f$, where A is specified in the * \return The expression \f$ A^p \f$, where A is specified in the
* constructor. * constructor.
*/ */
const MatrixPowerHelper::ReturnValue<MatrixPowerTriangular> operator()(RealScalar p) const MatrixPowerRetval<MatrixPowerTriangular> operator()(RealScalar p)
{ return MatrixPowerHelper::ReturnValue<MatrixPowerTriangular>(*this, p); } { return MatrixPowerRetval<MatrixPowerTriangular>(*this, p); }
/** /**
* \brief Compute the matrix power. * \brief Compute the matrix power.
@ -450,8 +446,8 @@ class MatrixPower
* \return The expression \f$ A^p \f$, where A is specified in the * \return The expression \f$ A^p \f$, where A is specified in the
* constructor. * constructor.
*/ */
const MatrixPowerHelper::ReturnValue<MatrixPower> operator()(RealScalar p) const MatrixPowerRetval<MatrixPower> operator()(RealScalar p)
{ return MatrixPowerHelper::ReturnValue<MatrixPower>(*this, p); } { return MatrixPowerRetval<MatrixPower>(*this, p); }
/** /**
* \brief Compute the matrix power. * \brief Compute the matrix power.
@ -635,7 +631,7 @@ class MatrixPowerReturnValue : public ReturnByValue< MatrixPowerReturnValue<Deri
namespace internal { namespace internal {
template<typename MatrixPowerType> template<typename MatrixPowerType>
struct traits< MatrixPowerHelper::ReturnValue<MatrixPowerType> > struct traits< MatrixPowerRetval<MatrixPowerType> >
{ typedef typename MatrixPowerType::PlainObject ReturnType; }; { typedef typename MatrixPowerType::PlainObject ReturnType; };
template<typename Derived> template<typename Derived>