fixing parameter order

This commit is contained in:
Pedro Machado Manhães de Castro 2014-03-06 15:53:52 +01:00
parent 15d098c55f
commit 505532f212
2 changed files with 29 additions and 40 deletions

View File

@ -178,18 +178,7 @@ void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator en
}
template <class RandomAccessIterator, class Kernel>
void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
const typename Kernel::Point_3 &p, double sq_r, const Kernel &k)
{
typedef std::iterator_traits<RandomAccessIterator> ITraits;
typedef typename ITraits::value_type value_type;
internal::hilbert_sort_on_sphere(begin, end, k, Hilbert_sort_median_policy(),
static_cast<value_type *> (0), sq_r, p);
}
template <class RandomAccessIterator>
template <class RandomAccessIterator>
void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_median_policy policy,
double sq_r = 1.0,
const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
@ -205,7 +194,7 @@ void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator en
}
template <class RandomAccessIterator>
template <class RandomAccessIterator>
void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_middle_policy policy,
double sq_r = 1.0,
const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
@ -221,7 +210,7 @@ void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator en
}
template <class RandomAccessIterator, class Kernel, class Policy>
template <class RandomAccessIterator, class Kernel, class Policy>
void hilbert_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy policy,
double sq_r = 1.0, const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0))
{

View File

@ -88,11 +88,11 @@ namespace internal {
const Kernel &k,
Policy /*policy*/,
typename Kernel::Point_3 *,
double sq_r,
const typename Kernel::Point_3 &p,
std::ptrdiff_t threshold_hilbert,
std::ptrdiff_t threshold_multiscale,
double ratio,
double sq_r,
const typename Kernel::Point_3 &p)
double ratio)
{
typedef Hilbert_sort_on_sphere_3<Kernel, Policy> Sort;
boost::rand48 random;
@ -210,69 +210,69 @@ template <class RandomAccessIterator, class Policy, class Kernel>
void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
const Kernel &k,
Policy policy,
double sq_r=1.0,
const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0),
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0,
double sq_r=1.0,
const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0))
double ratio=0.0)
{
typedef std::iterator_traits<RandomAccessIterator> ITraits;
typedef typename ITraits::value_type value_type;
internal::spatial_sort_on_sphere(begin, end, k, policy, static_cast<value_type *> (0),
threshold_hilbert,threshold_multiscale,ratio,sq_r,p);
sq_r,p, threshold_hilbert,threshold_multiscale,ratio);
}
template <class RandomAccessIterator>
void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
Hilbert_sort_median_policy policy,
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0,
double sq_r=1.0,
const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0))
typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0),
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0)
{
typedef std::iterator_traits<RandomAccessIterator> ITraits;
typedef typename ITraits::value_type value_type;
typedef CGAL::Kernel_traits<value_type> KTraits;
typedef typename KTraits::Kernel Kernel;
spatial_sort_on_sphere (begin, end, Kernel(), policy,
threshold_hilbert,threshold_multiscale,ratio,sq_r,p);
spatial_sort_on_sphere (begin, end, Kernel(), policy, sq_r, p,
threshold_hilbert,threshold_multiscale,ratio);
}
template <class RandomAccessIterator>
void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
Hilbert_sort_middle_policy policy,
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0,
double sq_r=1.0,
const typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3 &p =
typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0))
typename CGAL::Kernel_traits<typename std::iterator_traits<RandomAccessIterator>::value_type>::Kernel::Point_3(0,0,0),
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0)
{
typedef std::iterator_traits<RandomAccessIterator> ITraits;
typedef typename ITraits::value_type value_type;
typedef CGAL::Kernel_traits<value_type> KTraits;
typedef typename KTraits::Kernel Kernel;
spatial_sort_on_sphere (begin, end, Kernel(), policy,
threshold_hilbert,threshold_multiscale,ratio,sq_r,p);
spatial_sort_on_sphere (begin, end, Kernel(), policy, sq_r,p,
threshold_hilbert,threshold_multiscale,ratio);
}
template <class RandomAccessIterator, class Kernel>
void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator end,
double sq_r,
const typename Kernel::Point_3 &p,
const Kernel &k,
std::ptrdiff_t threshold_hilbert=0,
double sq_r = 1.0,
const typename Kernel::Point_3 &p = typename Kernel::Point_3(0,0,0),
std::ptrdiff_t threshold_hilbert=0,
std::ptrdiff_t threshold_multiscale=0,
double ratio=0.0)
{
spatial_sort_on_sphere (begin, end, k,
Hilbert_sort_median_policy(),
threshold_hilbert,threshold_multiscale,ratio,sq_r,p);
Hilbert_sort_median_policy(), sq_r, p,
threshold_hilbert,threshold_multiscale,ratio);
}
template <class RandomAccessIterator>
@ -285,8 +285,8 @@ void spatial_sort_on_sphere (RandomAccessIterator begin, RandomAccessIterator en
double ratio=0.0)
{
spatial_sort_on_sphere (begin, end,
Hilbert_sort_median_policy(),
threshold_hilbert,threshold_multiscale,ratio,sq_r,p);
Hilbert_sort_median_policy(), sq_r,p,
threshold_hilbert,threshold_multiscale,ratio);
}