Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: kernel for voronoi
- Date: Thu, 25 Feb 2010 19:09:40 +0100
mahdavi wrote:
hi,Sqrt is not defined on such a number type.
thanks for your help ,I write follow code and error again occur,please help
me ,thanks
code is:
////////////////////////////////////////////
#include <CGAL/Lazy_exact_nt.h>
typedef CGAL::Lazy_exact_nt<CGAL::Gmpq> NT;
K::Sphere_3 k1(Point_3(0,0,0),4.00003725);
NT l1=sqrt(k1.squared_radius());
If you want to manipulate exactly those kind of numbers you have to use algebraic numbers of degree 2 (otherwise use double and CGAL::to_double).
This would be equivalent to write:
CGAL::Root_of_traits_2<NT>::Root_of_2 l1=CGAL::make_root_of_2(0,1,k1.squared_radius());
Please have a look at:
http://www.cgal.org/Manual/last/doc_html/cgal_manual/NumberTypeSupport_ref/Class_Root_of_traits_2.html#Cross_link_anchor_115
http://www.cgal.org/Manual/last/doc_html/cgal_manual/NumberTypeSupport_ref/Concept_RootOf_2.html#Cross_link_anchor_113
http://www.cgal.org/Manual/last/doc_html/cgal_manual/NumberTypeSupport_ref/Function_make_root_of_2.html#Cross_link_anchor_116
S.
////////////////////////////////////////////////////////////
error :
cannot convert from 'CGAL::Null_functor::result_type' to
'CGAL::Lazy_exact_nt<ET_>'
/////////////////////////////////////////////////////
- [cgal-discuss] kernel for voronoi, mahdavi, 02/25/2010
- Re: [cgal-discuss] kernel for voronoi, Sebastien Loriot (GeometryFactory), 02/25/2010
- Re: [cgal-discuss] kernel for voronoi, Sebastien Loriot (GeometryFactory), 02/25/2010
- [cgal-discuss] Re: kernel for voronoi, mahdavi, 02/25/2010
- Re: [cgal-discuss] Re: kernel for voronoi, Sebastien Loriot (GeometryFactory), 02/25/2010
- [cgal-discuss] Re: kernel for voronoi, mahdavi, 02/25/2010
- Re: [cgal-discuss] kernel for voronoi, Sebastien Loriot (GeometryFactory), 02/25/2010
- <Possible follow-up(s)>
- [cgal-discuss] kernel for voronoi, mahdavi, 02/28/2010
- Re: [cgal-discuss] kernel for voronoi, Sebastien Loriot (GeometryFactory), 02/25/2010
Archive powered by MHonArc 2.6.16.