Subject: CGAL users discussion list
List archive
- From: "Marcel Janer" <>
- To: "'Ron Wein'" <>, <>
- Subject: RE: CGAL::Arr_conic_traits_2 with LEDA traits?
- Date: Wed, 6 Dec 2006 19:06:33 +0100
- Domainkey-signature: a=rsa-sha1; s=relay1; d=salleURL.edu; c=nofws; q=dns; h=from:to:subject:date:message-id:mime-version:content-type: content-transfer-encoding:x-mailer:x-mimeole:thread-index:in-reply-to; b=Aa1suVBpz9x3HNIa55WOk3iow0bNTMcLT6uBdbVjPHjWbkx9/HGBQojoZ0quTXCW5 vfdJ1HbzmfHfbOBCpdbL50xmxze8CTMTFl+DLSvB+W/4gtm2GkCC8qDBGZuic0j
Thank you Ron for those tips, I Will try to implement
LEDA_algebraic_number_traits and I will send to you. Of course I'm very
happy to do my little contribution to CGAL.
-----Mensaje original-----
De: Ron Wein
[mailto:]
Enviado el: miƩrcoles, 06 de diciembre de 2006 17:17
Para:
CC:
Asunto: RE: CGAL::Arr_conic_traits_2 with LEDA traits?
Dear Marcel,
> I use CGAL::Arr_conic_traits_2<..> with CORE traits:
> CGAL::CORE_algebraic_number_traits, is it possible do it with leda?
> I've got Leda 5.1.1 geometry module, I use :
>
> typedef CGAL::CORE_algebraic_number_traits Nt_traits;
> typedef leda_rational Rational;
> typedef leda_real Algebraic;
> typedef CGAL::Cartesian<Rational> Kernel_Rat;
> typedef CGAL::Cartesian<Algebraic> Kernel_Alg;
> typedef CGAL::Arr_conic_traits_2<Kernel_Rat,
> Kernel_Alg,
> Nt_traits> Conic_traits_2;
>
>
> I don't know how to replace the core number traits "Nt_traits" for the
> LEDA one. Have you got any IDEA?
Well, first of all, it is possible to use CORE even if you have LEDA
installed, and there should be no clash between the two.
If you want to use the number-types of LEDA, it is also possible. What you
need is to write a class of your own, call it
LEDA_algebraic_number_traits, which has the same interface as the
CORE_algebraic_number_traits class. You basically need your class to
define the nested types Integer, Rational and Algebraic (the LEDA integer,
LEDA rational, and LEDA real types, respectively, in your case), and a
Polynomial type, representing a polynomial with Integer coefficients.
The traits class also has supply functions invovling these types (e.g.
converting from Rational to Real, constructing polynomials, computing
roots of polynomials).
I suggest you take the CORE_algebraic_number_traits and implement all its
public member functions in terms of the LEDA interface. Then you can plug
it in you program and the "Nt_traits".
If you decide to do that and wish to contribute to CGAL, I'll appreciate
if you send me the code ...
> Is really more effective compute conic arrangements with LEDA than do
> it with CORE?
I have never checked with LEDA 5.1, which has the capability of computing
real roots of polynomials. From experiments I ran with LEDA 4.4 vs. CORE,
using only exact sqrt() operations, I found that CORE ran slightly faster.
Best regards,
Ron
- CGAL::Arr_conic_traits_2 with LEDA traits?, tm05855, 12/05/2006
- RE: [cgal-discuss] Additional Facets, David, 12/06/2006
- RE: [cgal-discuss] Additional Facets, Peter Hachenberger, 12/06/2006
- RE: RE: [cgal-discuss] Additional Facets, David, 12/06/2006
- RE: [cgal-discuss] Additional Facets, Peter Hachenberger, 12/06/2006
- <Possible follow-up(s)>
- RE: CGAL::Arr_conic_traits_2 with LEDA traits?, Marcel Janer, 12/06/2006
- RE: [cgal-discuss] Additional Facets, David, 12/06/2006
Archive powered by MHonArc 2.6.16.