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/PermutationMatrix.h | 57 ++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'Eigen/src/Core/PermutationMatrix.h') diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index afe37ef6d..9e99b6f91 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -48,20 +48,25 @@ * * \sa class DiagonalMatrix */ -template struct ei_permut_matrix_product_retval; + +namespace internal { + +template struct permut_matrix_product_retval; template -struct ei_traits > - : ei_traits > +struct traits > + : traits > {}; +} // end namespace internal + template class PermutationMatrix : public EigenBase > { public: #ifndef EIGEN_PARSED_BY_DOXYGEN - typedef ei_traits Traits; + typedef internal::traits Traits; typedef Matrix DenseMatrixType; enum { @@ -211,7 +216,7 @@ class PermutationMatrix : public EigenBase=0 && j>=0 && i=0 && j>=0 && i=0 && j>=0 && i=0 && j>=0 && i -inline const ei_permut_matrix_product_retval, Derived, OnTheRight> +inline const internal::permut_matrix_product_retval, Derived, OnTheRight> operator*(const MatrixBase& matrix, const PermutationMatrix &permutation) { - return ei_permut_matrix_product_retval + return internal::permut_matrix_product_retval , Derived, OnTheRight> (permutation, matrix.derived()); } @@ -313,29 +318,31 @@ operator*(const MatrixBase& matrix, /** \returns the matrix with the permutation applied to the rows. */ template -inline const ei_permut_matrix_product_retval +inline const internal::permut_matrix_product_retval , Derived, OnTheLeft> operator*(const PermutationMatrix &permutation, const MatrixBase& matrix) { - return ei_permut_matrix_product_retval + return internal::permut_matrix_product_retval , Derived, OnTheLeft> (permutation, matrix.derived()); } +namespace internal { + template -struct ei_traits > +struct traits > { typedef typename MatrixType::PlainObject ReturnType; }; template -struct ei_permut_matrix_product_retval - : public ReturnByValue > +struct permut_matrix_product_retval + : public ReturnByValue > { - typedef typename ei_cleantype::type MatrixTypeNestedCleaned; + typedef typename cleantype::type MatrixTypeNestedCleaned; - ei_permut_matrix_product_retval(const PermutationType& perm, const MatrixType& matrix) + permut_matrix_product_retval(const PermutationType& perm, const MatrixType& matrix) : m_permutation(perm), m_matrix(matrix) {} @@ -346,7 +353,7 @@ struct ei_permut_matrix_product_retval { const int n = Side==OnTheLeft ? rows() : cols(); - if(ei_is_same_type::ret && ei_extract_data(dst) == ei_extract_data(m_matrix)) + if(is_same_type::ret && extract_data(dst) == extract_data(m_matrix)) { // apply the permutation inplace Matrix mask(m_permutation.size()); @@ -396,10 +403,12 @@ struct ei_permut_matrix_product_retval /* Template partial specialization for transposed/inverse permutations */ template -struct ei_traits > > - : ei_traits > +struct traits > > + : traits > {}; +} // end namespace internal + template class Transpose > : public EigenBase > > @@ -409,7 +418,7 @@ class Transpose > public: #ifndef EIGEN_PARSED_BY_DOXYGEN - typedef ei_traits Traits; + typedef internal::traits Traits; typedef Matrix DenseMatrixType; enum { @@ -446,19 +455,19 @@ class Transpose > /** \returns the matrix with the inverse permutation applied to the columns. */ template friend - inline const ei_permut_matrix_product_retval + inline const internal::permut_matrix_product_retval operator*(const MatrixBase& matrix, const Transpose& trPerm) { - return ei_permut_matrix_product_retval(trPerm.m_permutation, matrix.derived()); + return internal::permut_matrix_product_retval(trPerm.m_permutation, matrix.derived()); } /** \returns the matrix with the inverse permutation applied to the rows. */ template - inline const ei_permut_matrix_product_retval + inline const internal::permut_matrix_product_retval operator*(const MatrixBase& matrix) const { - return ei_permut_matrix_product_retval(m_permutation, matrix.derived()); + return internal::permut_matrix_product_retval(m_permutation, matrix.derived()); } const PermutationType& nestedPermutation() const { return m_permutation; } -- cgit v1.2.3