Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h


Chronological Thread 
  • From: Nicholas Mario Wardhana <>
  • To:
  • Subject: Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h
  • Date: Wed, 7 Mar 2012 22:48:08 +0800

On 7 March 2012 01:29, Sebastien Loriot (GeometryFactory)
<>
wrote:
> Let switch the discussion in private. I'll post the answer on this list if
> we find a solution.
>
>
>

Thank you very much for your help, Sebastien!

After some discussions in private, I would like to make an update to
this mailing list.

Basically, I use a class based on the Distance class in here:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching/Chapter_main.html#Subsection_60.3.5

and at some points, the nearest neighbour computation calls
Distance::new_distance(). We found that this part:

return dist + new_off*new_off - old_off*old_off;

has a problem, in which the term after the '+' sign sometimes does not
equal to 0 when new_off = old_off. Sebastien suggested to wrap it in a
bracket:

return dist + (new_off*new_off - old_off*old_off);

and that solves the problem.

Thanks again for your help, I really appreciate it.

Best regards,
Nicholas



Archive powered by MHonArc 2.6.16.

Top of Page