diff --git a/Principal_component_analysis/include/CGAL/barycenter.h b/Principal_component_analysis/include/CGAL/barycenter.h index 90a709820fe..d6fcb5e395a 100644 --- a/Principal_component_analysis/include/CGAL/barycenter.h +++ b/Principal_component_analysis/include/CGAL/barycenter.h @@ -46,7 +46,7 @@ barycenter(InputIterator begin, InputIterator end, const K & ) typedef typename std::iterator_traits::value_type pair; typedef typename pair::second_type FT; typedef typename pair::first_type Point; - typedef typename Vector::type, K>::type Vector; + typedef typename Access::Vector::type>::type Vector; CGAL_precondition(begin != end); @@ -74,7 +74,7 @@ barycenter(PointInputIterator begin, PointInputIterator end, { typedef typename std::iterator_traits::value_type Point; typedef typename std::iterator_traits::value_type FT; - typedef typename Vector::type, K>::type Vector; + typedef typename Access::Vector::type>::type Vector; CGAL_precondition(begin != end); diff --git a/Principal_component_analysis/include/CGAL/centroid.h b/Principal_component_analysis/include/CGAL/centroid.h index e4cbbb4c58b..09d8bd631b6 100644 --- a/Principal_component_analysis/include/CGAL/centroid.h +++ b/Principal_component_analysis/include/CGAL/centroid.h @@ -812,9 +812,7 @@ template < typename InputIterator, typename K, typename Dim_tag > inline -typename Point::value_type, K>::type, - K - >::type +typename Access::Point::value_type, K>::type>::type centroid(InputIterator begin, InputIterator end, const K& k, @@ -832,9 +830,7 @@ template < typename InputIterator, typename Kernel_or_Dim > struct Dispatch_centroid { typedef Kernel_or_Dim K; - typedef typename Point::value_type, K>::type, - K - >::type result_type; + typedef typename Access::Point::value_type, K>::type >::type result_type; result_type operator()(InputIterator begin, InputIterator end, const K& k) const { @@ -848,10 +844,9 @@ struct Dispatch_centroid template < typename InputIterator, int dim > struct Dispatch_centroid < InputIterator, Dimension_tag > { - typedef typename Point::value_type, - typename Kernel_traits::value_type>::Kernel >::type, - typename Kernel_traits::value_type>::Kernel >::type result_type; + typedef typename Kernel_traits::value_type>::Kernel K; + typedef typename Access::Point::value_type, K >::type >::type result_type; result_type operator()(InputIterator begin, InputIterator end, Dimension_tag tag) const { @@ -865,10 +860,10 @@ struct Dispatch_centroid < InputIterator, Dimension_tag > template < typename InputIterator > struct Dispatch_centroid { - typedef typename Point::value_type>::Kernel K; + typedef typename Access::Point::value_type, - typename Kernel_traits::value_type>::Kernel >::type, - typename Kernel_traits::value_type>::Kernel >::type result_type; + K >::type >::type result_type; result_type operator()(InputIterator begin, InputIterator end, Dynamic_dimension_tag tag) const { @@ -896,10 +891,11 @@ centroid(InputIterator begin, InputIterator end, const Kernel_or_dim& k_or_d) // and uses Kernel_traits<> to find out its kernel, and Feature_dimension for the dimension tag. template < typename InputIterator > inline -typename Point::value_type>::Kernel, + typename Ambient_dimension< typename std::iterator_traits::value_type, - typename Kernel_traits::value_type>::Kernel >::type, typename Kernel_traits::value_type>::Kernel >::type + >::type centroid(InputIterator begin, InputIterator end) { typedef typename std::iterator_traits::value_type Point;