diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-10-26 16:47:01 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-10-26 16:47:01 +0200 |
commit | c738cd56ebdafe986c7edeb2621ec25f3c0b29d9 (patch) | |
tree | 2ff118b343b69a7dd68d7ad7d898fdfdc82c58ce /unsupported | |
parent | 2fbb9932b0f517643c5f05e4056b939b73956b00 (diff) |
Renamed cleantype to remove_all since it is close to remove_{const|pointer|reference}.
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 34 | ||||
-rw-r--r-- | unsupported/Eigen/src/Skyline/SkylineProduct.h | 22 |
2 files changed, 28 insertions, 28 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index a2aa42ad0..2f2992997 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -74,14 +74,14 @@ template<typename _DerType, bool Enable> struct auto_diff_special_op; template<typename _DerType> class AutoDiffScalar : public internal::auto_diff_special_op - <_DerType, !internal::is_same<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, - typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::value> + <_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar, + typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value> { public: typedef internal::auto_diff_special_op - <_DerType, !internal::is_same<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, - typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::value> Base; - typedef typename internal::cleantype<_DerType>::type DerType; + <_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar, + typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value> Base; + typedef typename internal::remove_all<_DerType>::type DerType; typedef typename internal::traits<DerType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real Real; @@ -178,11 +178,11 @@ class AutoDiffScalar } template<typename OtherDerType> - inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,DerType,typename internal::cleantype<OtherDerType>::type> > + inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,DerType,typename internal::remove_all<OtherDerType>::type> > operator+(const AutoDiffScalar<OtherDerType>& other) const { internal::make_coherent(m_derivatives, other.derivatives()); - return AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,DerType,typename internal::cleantype<OtherDerType>::type> >( + return AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,DerType,typename internal::remove_all<OtherDerType>::type> >( m_value + other.value(), m_derivatives + other.derivatives()); } @@ -196,11 +196,11 @@ class AutoDiffScalar } template<typename OtherDerType> - inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, DerType,typename internal::cleantype<OtherDerType>::type> > + inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, DerType,typename internal::remove_all<OtherDerType>::type> > operator-(const AutoDiffScalar<OtherDerType>& other) const { internal::make_coherent(m_derivatives, other.derivatives()); - return AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, DerType,typename internal::cleantype<OtherDerType>::type> >( + return AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, DerType,typename internal::remove_all<OtherDerType>::type> >( m_value - other.value(), m_derivatives - other.derivatives()); } @@ -290,14 +290,14 @@ class AutoDiffScalar inline const AutoDiffScalar<CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, CwiseBinaryOp<internal::scalar_difference_op<Scalar>, CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, DerType>, - CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::cleantype<OtherDerType>::type > > > > + CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::remove_all<OtherDerType>::type > > > > operator/(const AutoDiffScalar<OtherDerType>& other) const { internal::make_coherent(m_derivatives, other.derivatives()); return AutoDiffScalar<CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, CwiseBinaryOp<internal::scalar_difference_op<Scalar>, CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, DerType>, - CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::cleantype<OtherDerType>::type > > > >( + CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::remove_all<OtherDerType>::type > > > >( m_value / other.value(), ((m_derivatives * other.value()) - (m_value * other.derivatives())) * (Scalar(1)/(other.value()*other.value()))); @@ -306,13 +306,13 @@ class AutoDiffScalar template<typename OtherDerType> inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>, CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, DerType>, - CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::cleantype<OtherDerType>::type> > > + CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::remove_all<OtherDerType>::type> > > operator*(const AutoDiffScalar<OtherDerType>& other) const { internal::make_coherent(m_derivatives, other.derivatives()); return AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>, CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, DerType>, - CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::cleantype<OtherDerType>::type > > >( + CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::remove_all<OtherDerType>::type > > >( m_value * other.value(), (m_derivatives * other.value()) + (m_value * other.derivatives())); } @@ -343,7 +343,7 @@ struct auto_diff_special_op<_DerType, true> // : auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real, // is_same<Scalar,typename NumTraits<Scalar>::Real>::value> { - typedef typename cleantype<_DerType>::type DerType; + typedef typename remove_all<_DerType>::type DerType; typedef typename traits<DerType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real Real; @@ -475,11 +475,11 @@ struct scalar_product_traits<AutoDiffScalar<DerType>,T> #define EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(FUNC,CODE) \ template<typename DerType> \ - inline const Eigen::AutoDiffScalar<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<typename Eigen::internal::traits<typename Eigen::internal::cleantype<DerType>::type>::Scalar>, typename Eigen::internal::cleantype<DerType>::type> > \ + inline const Eigen::AutoDiffScalar<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<typename Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar>, typename Eigen::internal::remove_all<DerType>::type> > \ FUNC(const Eigen::AutoDiffScalar<DerType>& x) { \ using namespace Eigen; \ - typedef typename internal::traits<typename internal::cleantype<DerType>::type>::Scalar Scalar; \ - typedef AutoDiffScalar<CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::cleantype<DerType>::type> > ReturnType; \ + typedef typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar Scalar; \ + typedef AutoDiffScalar<CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, typename internal::remove_all<DerType>::type> > ReturnType; \ CODE; \ } diff --git a/unsupported/Eigen/src/Skyline/SkylineProduct.h b/unsupported/Eigen/src/Skyline/SkylineProduct.h index d7c536880..aeedc47ec 100644 --- a/unsupported/Eigen/src/Skyline/SkylineProduct.h +++ b/unsupported/Eigen/src/Skyline/SkylineProduct.h @@ -36,8 +36,8 @@ struct SkylineProductReturnType { template<typename LhsNested, typename RhsNested, int ProductMode> struct internal::traits<SkylineProduct<LhsNested, RhsNested, ProductMode> > { // clean the nested types: - typedef typename internal::cleantype<LhsNested>::type _LhsNested; - typedef typename internal::cleantype<RhsNested>::type _RhsNested; + typedef typename internal::remove_all<LhsNested>::type _LhsNested; + typedef typename internal::remove_all<RhsNested>::type _RhsNested; typedef typename _LhsNested::Scalar Scalar; enum { @@ -133,8 +133,8 @@ protected: template<typename Lhs, typename Rhs, typename Dest> EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) { - typedef typename cleantype<Lhs>::type _Lhs; - typedef typename cleantype<Rhs>::type _Rhs; + typedef typename remove_all<Lhs>::type _Lhs; + typedef typename remove_all<Rhs>::type _Rhs; typedef typename traits<Lhs>::Scalar Scalar; enum { @@ -196,8 +196,8 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons template<typename Lhs, typename Rhs, typename Dest> EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) { - typedef typename cleantype<Lhs>::type _Lhs; - typedef typename cleantype<Rhs>::type _Rhs; + typedef typename remove_all<Lhs>::type _Lhs; + typedef typename remove_all<Rhs>::type _Rhs; typedef typename traits<Lhs>::Scalar Scalar; enum { @@ -264,7 +264,7 @@ template<typename Lhs, typename Rhs, typename ResultType, template<typename Lhs, typename Rhs, typename ResultType> struct skyline_product_selector<Lhs, Rhs, ResultType, RowMajor> { - typedef typename traits<typename cleantype<Lhs>::type>::Scalar Scalar; + typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar; static void run(const Lhs& lhs, const Rhs& rhs, ResultType & res) { skyline_row_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs, res); @@ -273,7 +273,7 @@ struct skyline_product_selector<Lhs, Rhs, ResultType, RowMajor> { template<typename Lhs, typename Rhs, typename ResultType> struct skyline_product_selector<Lhs, Rhs, ResultType, ColMajor> { - typedef typename traits<typename cleantype<Lhs>::type>::Scalar Scalar; + typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar; static void run(const Lhs& lhs, const Rhs& rhs, ResultType & res) { skyline_col_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs, res); @@ -285,9 +285,9 @@ struct skyline_product_selector<Lhs, Rhs, ResultType, ColMajor> { // template<typename Derived> // template<typename Lhs, typename Rhs > // Derived & MatrixBase<Derived>::lazyAssign(const SkylineProduct<Lhs, Rhs, SkylineTimeDenseProduct>& product) { -// typedef typename internal::cleantype<Lhs>::type _Lhs; -// internal::skyline_product_selector<typename internal::cleantype<Lhs>::type, -// typename internal::cleantype<Rhs>::type, +// typedef typename internal::remove_all<Lhs>::type _Lhs; +// internal::skyline_product_selector<typename internal::remove_all<Lhs>::type, +// typename internal::remove_all<Rhs>::type, // Derived>::run(product.lhs(), product.rhs(), derived()); // // return derived(); |