Skip to content

Commit

Permalink
fixed test_pmp_distance
Browse files Browse the repository at this point in the history
  • Loading branch information
soesau committed Jan 23, 2025
1 parent 4228eef commit 5b28489
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct Custom_traits_Hausdorff
FT operator+(FT)const{return FT();}
FT operator*(FT)const{return FT();}
bool operator<=(FT)const{return false;}
bool operator==(FT)const{return false;}
bool operator>=(FT)const{return false;}
bool operator!=(FT)const{return false;}
bool operator<(FT)const{return false;}
Expand Down
6 changes: 3 additions & 3 deletions Spatial_searching/include/CGAL/Kd_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ class Kd_tree {
if (try_parallel_internal_node_creation (nh, c, c_low, tag))
return;

if (c_low.size() > split.bucket_size() && c_low.max_tight_spread() > 0)
if (c_low.size() > split.bucket_size() && !CGAL::is_zero(c_low.max_tight_spread()))
{
nh->lower_ch = new_internal_node();
create_internal_node (nh->lower_ch, c_low, tag);
}
else
nh->lower_ch = create_leaf_node(c_low);

if (c.size() > split.bucket_size() && c.max_tight_spread() > 0)
if (c.size() > split.bucket_size() && !CGAL::is_zero(c.max_tight_spread()))
{
nh->upper_ch = new_internal_node();
create_internal_node (nh->upper_ch, c, tag);
Expand Down Expand Up @@ -341,7 +341,7 @@ class Kd_tree {

Point_container c(dim_, data.begin(), data.end(),traits_);
bbox = new Kd_tree_rectangle<FT,D>(c.bounding_box());
if (c.size() <= split.bucket_size() || c.max_tight_spread() == 0){
if (c.size() <= split.bucket_size() || CGAL::is_zero(c.max_tight_spread())){
tree_root = create_leaf_node(c);
}else {
tree_root = new_internal_node();
Expand Down

0 comments on commit 5b28489

Please sign in to comment.