PIPS
chernikova.c
Go to the documentation of this file.
1 /*
2 
3  $Id: chernikova.c 1669 2019-06-26 17:24:57Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of Linear/C3 Library.
8 
9  Linear/C3 Library is free software: you can redistribute it and/or modify it
10  under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  Linear/C3 Library is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with Linear/C3 Library. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 
25 #ifdef HAVE_CONFIG_H
26 #include "config.h"
27 #endif
28 
29 #include <stdlib.h>
30 
31 #include "linear_assert.h"
32 #include "boolean.h"
33 #include "vecteur.h"
34 #include "contrainte.h"
35 #include "sc.h"
36 #include "sommet.h"
37 #include "ray_dte.h"
38 #include "sg.h"
39 #include "polyedre.h"
40 #include "polynome.h"
41 
43 {
44  Ptsg sg;
45 
46  if (linear_use_gmp())
47 #ifdef HAVE_GMP_H
48  sg = sc_to_sg_chernikova_mulprec(sc);
49 #else
50  abort();
51 #endif
52  else
54 
55  return sg;
56 }
57 
59 {
60  Psysteme sc;
61 
62  if (linear_use_gmp())
63 #ifdef HAVE_GMP_H
64  sc = sg_to_sc_chernikova_mulprec(sg);
65 #else
66  abort();
67 #endif // HAVE_GMP_H
68  else
70 
71  return sc;
72 }
73 
75 {
76  Psysteme sc;
77 
78  if (linear_use_gmp())
79 #ifdef HAVE_GMP_H
80  sc = sc_convex_hull_mulprec(sc1, sc2);
81 #else
82  abort();
83 #endif // HAVE_GMP_H
84  else
85  sc = sc_convex_hull_fixprec(sc1, sc2);
86 
87  return sc;
88 }
bool linear_use_gmp(void)
whether linear is to use gmp
Definition: errors.c:454
Psysteme sc_convex_hull(Psysteme sc1, Psysteme sc2)
Definition: chernikova.c:74
Psysteme sg_to_sc_chernikova(Ptsg sg)
Definition: chernikova.c:58
Ptsg sc_to_sg_chernikova(Psysteme sc)
chernikova_mulprec.c
Definition: chernikova.c:42
Ptsg sc_to_sg_chernikova_fixprec(Psysteme sc)
chernikova_fixprec.c
Psysteme sc_convex_hull_fixprec(Psysteme sc1, Psysteme sc2)
Psysteme sg_to_sc_chernikova_fixprec(Ptsg sg)
Ptsg sg
#define abort()
Definition: misc-local.h:53
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
Definition: sg-local.h:66