Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Converting doubles to Filtered_extended_homogeneous

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Converting doubles to Filtered_extended_homogeneous


Chronological Thread 
  • From: erickee <>
  • To:
  • Subject: [cgal-discuss] Re: Converting doubles to Filtered_extended_homogeneous
  • Date: Fri, 27 Jan 2012 08:46:51 -0800 (PST)

> Did you just try assigning it? For example CGAL::Gmpq automatically casts
double values.

You are right that CGAL::Gmpq automatically converts doubles, rather than
simply truncating them. I think that Gmpq is a model for a field type,
though.
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/NumberTypeSupport_ref/Class_Gmpq.html

I am constructing Filtered_extended_homogeneous points, which require a ring
type like CGAL::Gmpz. Furthermore, the homogeneous point class must do this
conversion, not the number type. For example,
-- homogeneous point [1.012 5.098 2] is the same as [1012 5098 2000],

It seems that only the homogenous class could have all three numbers, which
are necessary to make the conversion.

I could code something like this on my own, but I wonder if there are
subtleties to consider about the various number representations. CGAL is
focused on these concerns, so I'm wishing for a conversion function from
them.






--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Converting-doubles-to-Filtered-extended-homogeneous-tp4332165p4334002.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page