Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Kernel traits to distinguish kernel capability?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Kernel traits to distinguish kernel capability?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Kernel traits to distinguish kernel capability?
  • Date: Tue, 03 Sep 2013 17:48:49 +0200
  • Organization: GeometryFactory

You can check whether Kernel::FT is a floating point.

http://www.boost.org/doc/libs/1_54_0/libs/type_traits/doc/html/boost_typetraits/reference/is_floating_point.html

Sebastien.

On 09/03/2013 04:26 PM, ax487 wrote:
Hello all,

I am currently trying to make my algorithms work with different types of
kernels: Up to now I have only been working using a kernel providing
exact construction, now I am trying to write a correct implementation of
my algorithm on a kernel that only provides exact predicates and uses
floating point based construction. Clearly this requires some additional
work. I would like to avoid that additional work on kernels providing
exact construction. To this end I need a method to tell if a given
kernel provides exact construction. I am currently working using
#ifdef's, but instead I would like use templates in my classes and
functions. What I need is something like a static function
`Kernel::provides_exact_construction()' which I could call in a method
like `template<class Kernel> void calculate(...)'. I did not find
anything like that in the documentation so far, is there a method to
obtain the information from CGAL?

ax487





Archive powered by MHonArc 2.6.18.

Top of Page