Some updates to the things that moved to the CGAL::Access namespace.

This commit is contained in:
Sylvain Pion 2008-04-17 21:04:05 +00:00
parent 39dc525fa0
commit 2f4e459d75
2 changed files with 13 additions and 17 deletions

View File

@ -46,7 +46,7 @@ barycenter(InputIterator begin, InputIterator end, const K & )
typedef typename std::iterator_traits<InputIterator>::value_type pair;
typedef typename pair::second_type FT;
typedef typename pair::first_type Point;
typedef typename Vector<typename Ambient_dimension<Point, K>::type, K>::type Vector;
typedef typename Access::Vector<K, typename Ambient_dimension<Point, K>::type>::type Vector;
CGAL_precondition(begin != end);
@ -74,7 +74,7 @@ barycenter(PointInputIterator begin, PointInputIterator end,
{
typedef typename std::iterator_traits<PointInputIterator>::value_type Point;
typedef typename std::iterator_traits<WeightInputIterator>::value_type FT;
typedef typename Vector<typename Ambient_dimension<Point, K>::type, K>::type Vector;
typedef typename Access::Vector<K, typename Ambient_dimension<Point, K>::type>::type Vector;
CGAL_precondition(begin != end);

View File

@ -812,9 +812,7 @@ template < typename InputIterator,
typename K,
typename Dim_tag >
inline
typename Point<typename Ambient_dimension<typename std::iterator_traits<InputIterator>::value_type, K>::type,
K
>::type
typename Access::Point<K, typename Ambient_dimension<typename std::iterator_traits<InputIterator>::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<typename Ambient_dimension<typename std::iterator_traits<InputIterator>::value_type, K>::type,
K
>::type result_type;
typedef typename Access::Point<K, typename Ambient_dimension<typename std::iterator_traits<InputIterator>::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<dim> >
{
typedef typename Point<typename Ambient_dimension<
typename std::iterator_traits<InputIterator>::value_type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel >::type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel >::type result_type;
typedef typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel K;
typedef typename Access::Point<K, typename Ambient_dimension<
typename std::iterator_traits<InputIterator>::value_type, K >::type >::type result_type;
result_type operator()(InputIterator begin, InputIterator end, Dimension_tag<dim> tag) const
{
@ -865,10 +860,10 @@ struct Dispatch_centroid < InputIterator, Dimension_tag<dim> >
template < typename InputIterator >
struct Dispatch_centroid <InputIterator, Dynamic_dimension_tag>
{
typedef typename Point<typename Ambient_dimension<
typedef typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel K;
typedef typename Access::Point<K, typename Ambient_dimension<
typename std::iterator_traits<InputIterator>::value_type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel >::type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::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<typename Ambient_dimension<
typename Access::Point<typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel,
typename Ambient_dimension<
typename std::iterator_traits<InputIterator>::value_type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel >::type,
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel >::type
>::type
centroid(InputIterator begin, InputIterator end)
{
typedef typename std::iterator_traits<InputIterator>::value_type Point;