Compile errors for Filtered_exact.h and CGAL::Failure_function

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

Compile errors for Filtered_exact.h and CGAL::Failure_function

Junjie Cao
Dear,

I meet some compile errors using CGAL 3.5 to build a old (several years ago) program.
The program seems need CGAL::Filtered_exact and CGAL::Failure_function. But I failed to find them in CGAL 3.5.

#include <CGAL/Filtered_exact.h>
typedef CGAL::Filtered_exact<double, CGAL::MP_Float>          NT;

CGAL::Failure_function old_ff = CGAL::set_error_handler(failure_func);

How could I compile the program?

Thanks,
JJCAO


Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Sylvain Pion
Administrator
Le 05/02/10 08:35, Junjie Cao a écrit :

> Dear,
>
> I meet some compile errors using CGAL 3.5 to build a old (several years
> ago) program.
> The program seems need CGAL::Filtered_exact and CGAL::Failure_function.
> But I failed to find them in CGAL 3.5.
>
> *#include <CGAL/Filtered_exact.h>*
> *typedef CGAL::Filtered_exact<double, CGAL::MP_Float>          NT;*
> *
> *
> *CGAL::Failure_function old_ff = CGAL::set_error_handler(failure_func);*
>
> How could I compile the program?

Try adding #include <CGAL/assertions_behaviour.h>.

The function CGAL::set_error_handler is now declared in this header
(instead of <CGAL/assertions.h> previously).

--
Sylvain Pion
INRIA Sophia Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

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

Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Sylvain Pion
Administrator
Le 05/02/10 09:18, Sylvain Pion a écrit :

> Le 05/02/10 08:35, Junjie Cao a écrit :
>> Dear,
>>
>> I meet some compile errors using CGAL 3.5 to build a old (several years
>> ago) program.
>> The program seems need CGAL::Filtered_exact and CGAL::Failure_function.
>> But I failed to find them in CGAL 3.5.
>>
>> *#include <CGAL/Filtered_exact.h>*
>> *typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;*
>> *
>> *
>> *CGAL::Failure_function old_ff = CGAL::set_error_handler(failure_func);*
>>
>> How could I compile the program?
>
> Try adding #include <CGAL/assertions_behaviour.h>.
>
> The function CGAL::set_error_handler is now declared in this header
> (instead of <CGAL/assertions.h> previously).

Oh, and I did not realize in my first mail, but Filtered_exact is  now
completely gone (this must indeed be a very old program that you have here !).

You should try to replace something like :

   #include <CGAL/Filtered_exact.h>
   typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
   typedef CGAL::Cartesian<NT>  K;

by :

   #include <CGAL::Exact_predicates_inexact_constructions_kernel.h>
   typedefCGAL::Exact_predicates_inexact_constructions_kernel K;

If you do not succeed, please provide more details about your problem
(error messages, more code pieces).

--
Sylvain Pion
INRIA Sophia Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

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

Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Junjie Cao
Dear Pion,

#include <CGAL/Filtered_exact.h>
 typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
 typedef CGAL::Cartesian<NT>  K;
  • "typedef CGAL::Exact_predicates_inexact_constructions_kernel K" is OK. But the NT will be used define some other variables.
    What should I define NT?  I use "typedef double NT" now.
  • There is also another error: 'det3x3_by_formula' : is not a member of 'CGAL'. 
Thank you.
Best regards,
JJCAO
Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Sylvain Pion
Administrator
Le 05/02/10 10:37, Junjie Cao a écrit :

> Dear Pion,
>
>     #include <CGAL/Filtered_exact.h>
>
>       typedef CGAL::Filtered_exact<double, CGAL::MP_Float> NT;
>
>       typedef CGAL::Cartesian<NT>  K;
>
>     * "typedef CGAL::Exact_predicates_inexact_constructions_kernel K" is
>       OK. But the NT will be used define some other variables.
>       What should I define NT?  I use "typedef double NT" now.

"typedef double NT" is fine.
"typedef K::NT" is slightly better from some point of view, but in this
case will be exactly the same.

>     * There is also another error: 'det3x3_by_formula' : is not a member
>       of 'CGAL'.

It has been renamed to "determinant"  (in <CGAL/determinant.h>).
Note that this particular function is not documented.  You may prefer
to use the documented interface if you expect your program to continue
to work in the future (not that we never break the API, but certainly
the probability of a change in the undocumented part is definitely higher).

--
Sylvain Pion
INRIA Sophia Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

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

Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Laurent Rineau (GeometryFactory)
On Friday 05 February 2010 10:47:30 Sylvain Pion wrote:
> It has been renamed to "determinant"  (in <CGAL/determinant.h>).
> Note that this particular function is not documented.  You may prefer
> to use the documented interface if you expect your program to continue
> to work in the future (not that we never break the API, but certainly
> the probability of a change in the undocumented part is definitely higher).

One another difference it that if we ever break the API of a *documented*
feature, then that change will be announced in the CHANGES file of the new
CGAL release (and the announcement email that I send).

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/

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

Reply | Threaded
Open this post in threaded view
|

Re: Compile errors for Filtered_exact.h and CGAL::Failure_function

Junjie Cao
Dear Pion and Rineau,

I've used "determinant" instead of that function, and build the old program successfully.
Thank you.

Best regards,
JJCAO

On Fri, Feb 5, 2010 at 8:15 PM, Laurent Rineau (GeometryFactory) <[hidden email]> wrote:
On Friday 05 February 2010 10:47:30 Sylvain Pion wrote:
> It has been renamed to "determinant"  (in <CGAL/determinant.h>).
> Note that this particular function is not documented.  You may prefer
> to use the documented interface if you expect your program to continue
> to work in the future (not that we never break the API, but certainly
> the probability of a change in the undocumented part is definitely higher).

One another difference it that if we ever break the API of a *documented*
feature, then that change will be announced in the CHANGES file of the new
CGAL release (and the announcement email that I send).

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/