Natural neighbor coordinates infinite loop

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Natural neighbor coordinates infinite loop

daniel.funke
Dear CGAL team,

I stumbled upon an infinite loop in the natural_neighbor_coordinates_2
function.

When running the attached example, I get into an infinite loop at
natural_neighbor_coordinates_vertex_2(). I attached a patch that fixes
the symptom of the problem, but I guess the cause is something else
entirely.

I would appreciate if someone could shed some light on the cause of the
issue.

Best regards
Daniel Funke

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



natural_neighbor_coordinates_2.patch (724 bytes) Download Attachment
testbed.tar.gz (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Natural neighbor coordinates infinite loop

jcannon
I can confirm that this patch also works for us (on CGAL 4.13).

Without the patch, using CGAL::natural_neighbor_coordinates_2() will hang in
an infinite loop for some of our Delaunay triangulations.

We're using CGAL::Exact_predicates_inexact_constructions_kernel.  We also
tried CGAL::Exact_predicates_exact_constructions_kernel but this did not
help (ie, still had an infinite loop) - we did need to add CGAL::to_double()
calls to convert CGAL::Exact_predicates_exact_constructions_kernel::FT (ie,
CGAL::Lazy_exact_nt<NT>) to double in various places, but this was always
after calling CGAL::natural_neighbor_coordinates_2().

Regards,
John



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Natural neighbor coordinates infinite loop

MaelRL
Hello,

A fix for this problem was merged recently and will be available in CGAL
bug fix versions 4.12.2 and 4.13.1 as well as in the next release, CGAL
4.14 (the beta is already available:
https://www.cgal.org/2019/03/13/cgal414-beta2/).

See the associated issue: https://github.com/CGAL/cgal/issues/3380, and
its pull request: https://github.com/CGAL/cgal/pull/3588.

Best,
Mael

On 15/03/2019 09:18, jcannon wrote:

> I can confirm that this patch also works for us (on CGAL 4.13).
>
> Without the patch, using CGAL::natural_neighbor_coordinates_2() will hang in
> an infinite loop for some of our Delaunay triangulations.
>
> We're using CGAL::Exact_predicates_inexact_constructions_kernel.  We also
> tried CGAL::Exact_predicates_exact_constructions_kernel but this did not
> help (ie, still had an infinite loop) - we did need to add CGAL::to_double()
> calls to convert CGAL::Exact_predicates_exact_constructions_kernel::FT (ie,
> CGAL::Lazy_exact_nt<NT>) to double in various places, but this was always
> after calling CGAL::natural_neighbor_coordinates_2().
>
> Regards,
> John
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Natural neighbor coordinates infinite loop

jcannon
Great, that fixes it for me.

Thanks very much !

Regards,
John



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss