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: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h
  • Date: Tue, 06 Mar 2012 17:33:20 +0100

Thanks for the update.

Can you try before the assertion

CGAL_assertion(new_rd >= copy_rd);

to change
new_rd=Orthogonal_distance_instance.new_distance(copy_rd,old_off,new_off,new_cut_dim);
into
new_rd=old_off==new_off?copy_rd:Orthogonal_distance_instance.new_distance(copy_rd,old_off,new_off,new_cut_dim);

I still suspect an optimization problem.

Sebastien.

On 03/06/2012 04:51 PM, Nicholas Mario Wardhana wrote:
On 2 March 2012 20:18, Nicholas Mario
Wardhana<>
wrote:

To be more exact, the problem arises when incrementing
neighbourIterator (neighbourIterator++).

Best regards,
Nicholas

Hi all,

I hope it is still fine for me to "resurrect" this few days-old thread.

After a few days, I cannot generate a small point list which can
result in assertion violation. But after playing around with my code,
I detected a violation under Debug configuration with the involved
values being

new_rd = 3111.4645430113583 , and
copy_rd = 3111.4645430113587 .

I can conclude that my problem is with the floating point accuracy. So
I changed lines 267 and 288 to

CGAL_assertion(new_rd + 0.0001>= copy_rd);

and the code works fine for me. Alternatively, I suppose I can just
comment these lines, since these violation does not seem to be fatal.
CMIIW

Thank you very much for your help!

Best regards,
Nicholas





Archive powered by MHonArc 2.6.16.

Top of Page