use traits member

This commit is contained in:
Sébastien Loriot 2022-04-04 09:59:42 +02:00
parent 9651c066b1
commit 1dfd16ea01
1 changed files with 15 additions and 16 deletions

View File

@ -154,26 +154,25 @@ public:
template <class RandomAccessIterator>
void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
{
K k;
double xmin=to_double(k.compute_x_3_object()(*begin)),
ymin=to_double(k.compute_y_3_object()(*begin)),
zmin=to_double(k.compute_z_3_object()(*begin)),
double xmin=to_double(_k.compute_x_3_object()(*begin)),
ymin=to_double(_k.compute_y_3_object()(*begin)),
zmin=to_double(_k.compute_z_3_object()(*begin)),
xmax=xmin,
ymax=ymin,
zmax=zmin;
for(RandomAccessIterator it=begin+1; it<end; ++it){
if ( to_double(k.compute_x_3_object()(*it)) < xmin)
xmin = to_double(k.compute_x_3_object()(*it));
if ( to_double(k.compute_y_3_object()(*it)) < ymin)
ymin = to_double(k.compute_y_3_object()(*it));
if ( to_double(k.compute_z_3_object()(*it)) < zmin)
zmin = to_double(k.compute_z_3_object()(*it));
if ( to_double(k.compute_x_3_object()(*it)) > xmax)
xmax = to_double(k.compute_x_3_object()(*it));
if ( to_double(k.compute_y_3_object()(*it)) > ymax)
ymax = to_double(k.compute_y_3_object()(*it));
if ( to_double(k.compute_z_3_object()(*it)) > zmax)
zmax = to_double(k.compute_z_3_object()(*it));
if ( to_double(_k.compute_x_3_object()(*it)) < xmin)
xmin = to_double(_k.compute_x_3_object()(*it));
if ( to_double(_k.compute_y_3_object()(*it)) < ymin)
ymin = to_double(_k.compute_y_3_object()(*it));
if ( to_double(_k.compute_z_3_object()(*it)) < zmin)
zmin = to_double(_k.compute_z_3_object()(*it));
if ( to_double(_k.compute_x_3_object()(*it)) > xmax)
xmax = to_double(_k.compute_x_3_object()(*it));
if ( to_double(_k.compute_y_3_object()(*it)) > ymax)
ymax = to_double(_k.compute_y_3_object()(*it));
if ( to_double(_k.compute_z_3_object()(*it)) > zmax)
zmax = to_double(_k.compute_z_3_object()(*it));
}
sort <0, false, false, false> (begin, end, xmin,ymin,zmin,xmax,ymax,zmax);