do not use default constructed kernel

This commit is contained in:
Sébastien Loriot 2022-04-08 14:55:51 +02:00
parent 88c6381e00
commit f34d1e3545
1 changed files with 10 additions and 12 deletions

View File

@ -123,22 +123,20 @@ public:
void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
{
//Bbox_2 box=bbox_2(begin, end); BUG: WE NEED TO FIX THIS
K k;
double xmin=to_double(k.compute_x_2_object()(*begin)),
ymin=to_double(k.compute_y_2_object()(*begin)),
double xmin=to_double(_k.compute_x_2_object()(*begin)),
ymin=to_double(_k.compute_y_2_object()(*begin)),
xmax=xmin,
ymax=ymin;
for(RandomAccessIterator it=begin+1; it<end; ++it){
if ( to_double(k.compute_x_2_object()(*it)) < xmin)
xmin = to_double(k.compute_x_2_object()(*it));
if ( to_double(k.compute_y_2_object()(*it)) < ymin)
ymin = to_double(k.compute_y_2_object()(*it));
if ( to_double(k.compute_x_2_object()(*it)) > xmax)
xmax = to_double(k.compute_x_2_object()(*it));
if ( to_double(k.compute_y_2_object()(*it)) > ymax)
ymax = to_double(k.compute_y_2_object()(*it));
if ( to_double(_k.compute_x_2_object()(*it)) < xmin)
xmin = to_double(_k.compute_x_2_object()(*it));
if ( to_double(_k.compute_y_2_object()(*it)) < ymin)
ymin = to_double(_k.compute_y_2_object()(*it));
if ( to_double(_k.compute_x_2_object()(*it)) > xmax)
xmax = to_double(_k.compute_x_2_object()(*it));
if ( to_double(_k.compute_y_2_object()(*it)) > ymax)
ymax = to_double(_k.compute_y_2_object()(*it));
}
sort <0, false, false> (begin, end, xmin, ymin, xmax, ymax);