23 #ifndef LINEAR_CHERNIKOVA_H
24 #define LINEAR_CHERNIKOVA_H
48 #define FPRINT_NBDIGITS 6
50 #define _STRINGOF(str) #str
51 #define STRINGOF(str) _STRINGOF(str)
59 fprintf(stderr,
"[" __FILE__
"] out of memory space\n");
66 ptr = realloc(ptr, size);
68 fprintf(stderr,
"[" __FILE__
"] out of memory space\n");
80 #define BSWAP(a, b, l) { \
81 char* t = (char*) safe_malloc(l * sizeof(char)); \
82 memcpy((t), (char*) (a), (int) (l)); \
83 memcpy((char*) (a), (char*) (b), (int) (l)); \
84 memcpy((char*) (b), (t), (int) (l)); \
88 #define SWAP(a, b, t) { \
102 #define TIMEOUT_ENV "LINEAR_CONVEX_HULL_TIMEOUT"
107 static int linear_convex_hull_timeout = -1;
109 if (linear_convex_hull_timeout == -1) {
113 linear_convex_hull_timeout = atoi(
env);
116 if (linear_convex_hull_timeout < 0) {
117 linear_convex_hull_timeout = 0;
120 return linear_convex_hull_timeout;
124 fprintf(stderr,
"CATCH alarm sc_convex_hull !!!\n");
136 for (i = 0; i < (
int) nbvals; i++) {
144 for (i = 0; i < (
int) nbvals; i++) {
160 for (i = 0; i < nbvals; i++) {
170 for (i = 0; i < nbvals; i++) {
180 for (i = 0; i < nbvals; i++) {
191 for (i = 0; i < nbvals; i++) {
201 zval_t lambda,
unsigned nbvals) {
203 for (i = 0; i < nbvals; i++) {
204 zval_div(zvec2[i], zvec1[i], lambda);
210 for (i = 0; i < nbvals; i++) {
219 for (i = 0; i < (
int) nbvals; i++) {
225 return i == (
int) nbvals ? -1 : i;
231 int* pindex,
zval_t* pmin) {
241 for (i = i + 1; i < (
int) nbvals; i++) {
260 for (i = 0; i < (
int) nbvals; i++) {
264 for (cw = vals, i = 0; i < (
int) nbvals; i++) {
274 for (i = 0; i < (
int) nbvals; i++, cw++) {
286 for (i = 0; i < (
int) nbvals; i++) {
309 for (i = 1; i < nbvals; i++) {
334 if (nbrows == 0 || nbcols == 0) {
340 zmat->
nbvals = nbrows * nbcols;
346 for (i = 0; i < (
int) nbrows; i++) {
378 for (i = (
int) zmat->
nbvals; i < (
int) (zmat->
nbcols * nbrows); i++) {
387 for (i = 0; i < (
int) nbrows; i++) {
400 for (i = 0; i < (
int) zmat->
nbrows; i++) {
402 for (j = 0; j < (
int) zmat->
nbcols; j++) {
412 #define WSIZE (8 * sizeof(int))
414 #define MSB ((unsigned) (((unsigned) 1) << (WSIZE - 1)))
416 #define NEXT(j ,b) { \
417 if (!((b) >>= 1)) { \
427 static void bvec_lor(
int* bvec1,
int* bvec2,
int* bvec3,
unsigned nbvals) {
428 int* cp1, * cp2, * cp3;
433 for (i = 0; i < (
int) nbvals; i++) {
441 #define bvec_copy(bvec1, bvec2, nbvals) \
442 (memcpy((char*) (bvec2), (char*) (bvec1), (int) ((nbvals) * sizeof(int))))
444 #define bvec_init(bvec, nbvals) \
445 (memset((char*) (bvec), 0, (int) ((nbvals) * sizeof(int))))
465 if (nbrows == 0 || nbcols == 0) {
472 for (i = 0; i < nbrows; i++) {
498 for (i = 0; i < (
int) nbrows; i++) {
508 for (i = 0; i < (
int) bmat->
nbrows; i++) {
509 vals = *(bmat->
vals + i);
510 for (j = 0; j < (
int) bmat->
nbcols; j++) {
511 fprintf(stream,
" %10X ", *vals++);
554 int pos,
unsigned nbvals) {
556 zval_t abs_a1, abs_a2, neg_a1;
567 zvec_combine(zvec1 + 1, zvec2 + 1, zvec3 + 1, a2, neg_a1, nbvals);
574 int *equal_bound,
int *sup_bound,
unsigned nbcols1,
575 unsigned nbcols2,
unsigned bx,
unsigned jx) {
577 zval_t** uni_eq, ** uni_sup, ** uni_inf;
578 int ** inc_eq, ** inc_sup, ** inc_inf;
579 *sup_bound = *equal_bound = nbbrays;
580 uni_sup = uni_eq = rays->
vals + nbbrays;
581 inc_sup = inc_eq = sat->
vals + nbbrays;
583 uni_inf = rays->
vals + nbrays;
584 inc_inf = sat->
vals + nbrays;
585 while (inf_bound > *sup_bound) {
587 if (inc_eq != inc_sup) {
589 BSWAP(*inc_eq, *inc_sup, nbcols2);
599 *((*inc_sup) + jx) |= bx;
604 if (inc_inf != inc_sup) {
606 BSWAP(*inc_inf, *inc_sup, nbcols2);
620 volatile unsigned nbbrays,
621 volatile unsigned nbmaxrays,
624 unsigned nbconstrs = constrs->
nbrows;
625 volatile unsigned nbrays = rays->
nbrows;
626 unsigned nbdims = constrs->
nbcols - 1;
627 unsigned sat_nbcols = sat->
nbcols;
628 unsigned nbcols1 = nbdims + 1;
629 unsigned nbcols2 = sat_nbcols *
sizeof(
int);
630 int sup_bound, equal_bound, bound;
634 int aux, nbcommonconstrs, index;
635 zval_t* vals1, * vals2, * vals3;
645 for (k = 0; k < (
int) nbconstrs; k++) {
647 for (i = 0; i < (
int) nbrays; i++) {
648 vals1 = rays->
vals[i] + 1;
649 vals2 = constrs->
vals[k] + 1;
650 vals3 = rays->
vals[i];
654 for (j = 1; j < (
int) nbdims; j++) {
663 if (index < (
int) nbbrays) {
665 if ((
int) nbbrays != index) {
668 for (i = 0; i < (
int) nbbrays; i++) {
675 vals1 = rays->
vals[nbbrays];
676 for (j = 0; j < (
int) nbdims + 1; j++) {
681 for (i = (
int) nbbrays + 1; i < (
int) nbrays; i++) {
688 for (j = 0; j < (
int) sat_nbcols; j++) {
689 sat->
vals[nbbrays][j] = 0;
691 sat->
vals[nbbrays][jx] |= bx;
694 if (--nbrays != nbbrays) {
701 sort_rays(rays, sat, nbbrays, nbrays, &equal_bound, &sup_bound,
702 nbcols1, nbcols2, bx, jx);
704 for (i = equal_bound; i < sup_bound; i++) {
705 for (j = sup_bound; j < bound; j++) {
707 for (l = 0; l < (
int) jx; l++) {
709 for (m =
MSB; m != 0; m >>= 1) {
715 aux = tmp[jx] = sat->
vals[i][jx] | sat->
vals[j][jx];
716 for (m =
MSB; m != bx; m >>= 1) {
727 if (nbcommonconstrs + nbbrays >= nbdims - 2) {
729 for (m = nbbrays; (
int) m < bound; m++) {
730 if (((
int) m != i) && ((
int) m != j)) {
736 for (l = 0; l <= (
int) jx; l++, iv2++, iv1++) {
748 if (nbrays == nbmaxrays) {
758 sat->
vals[nbrays][jx] &= ~bx;
766 while (j < bound && i > bound) {
791 int nbrows = zmat->
nbrows;
803 for (j = 1; j <= nbdims; j++) {
804 for (i =
rank; i < nbeqs; i++) {
821 for (i =
pivot + 1; i < nbeqs; i++) {
830 for (k =
rank - 1; k >= 0; k--) {
832 for (i = 0; i < k; i++) {
834 combine(vals[i], vals[k], vals[i], j, nbdims);
837 for (i = nbeqs; i < nbrows; i++) {
839 combine (vals[i], vals[k], vals[i], j, nbdims);
852 zmat_p constrs = *pconstrs, rays = *prays;
853 zmat_p constrs2 = NULL, rays2 = NULL;
854 unsigned nbbrays, nburays, nbeqs, nbineqs;
855 unsigned nbbrays2 = -1, nburays2 = -1, nbeqs2 = -1, nbineqs2 = -1;
856 unsigned nbdims = constrs->
nbcols - 1;
857 unsigned nbrays = rays->nbrows;
858 unsigned sat_nbcols = sat->
nbcols;
859 volatile unsigned nbconstrs = constrs->
nbrows;
860 unsigned nbcols2 = sat_nbcols *
sizeof(
int);
865 unsigned* trace = NULL, * bx = NULL, * jx = NULL, dimrayspace, b;
885 for (j = 0; j < (
int) nbconstrs; j++) {
891 for (i = 0; i < (
int) nbrays; i++) {
901 for (j = 0; j < (
int) nbconstrs; j++) {
905 for (i = 0; i < (
int) nbrays; i++) {
906 if (!(sat->
vals[i][jx[j]] & bx[j])) {
915 if (j == (
int) nbconstrs) {
919 SWAP(jx[j], jx[nbconstrs],
aux);
920 SWAP(bx[j], bx[nbconstrs],
aux);
924 for (i = 0; i < (
int) nbrays; i++) {
925 if (!(sat->
vals[i][jx[j]] & bx[j])) {
927 zval_add(rays->vals[i][0], rays->vals[i][0], one);
934 constrs->
nbrows = nbconstrs;
936 for (i = 0; i < (
int) nbrays; i++) {
938 zval_add(rays->vals[i][0], rays->vals[i][0], one);
940 if (
zval_cmp_i(rays->vals[i][0], nbconstrs + 1) == 0) {
944 for (i = 0; i < (
int) nbeqs; i++) {
947 k < (
int) nbconstrs; k++);
948 if (k == (
int) nbconstrs) {
964 nbeqs2 =
gauss(constrs, nbeqs, nbdims);
965 if (nbeqs2 >= nbdims) {
968 for (i = 0, k = nbrays; i < (
int) nbbrays && k > i; i++) {
969 if (
zval_cmp_i(rays->vals[i][0], nbconstrs + 1) != 0) {
970 while (--k > i &&
zval_cmp_i(rays->vals[k][0], nbconstrs + 1) != 0);
971 zvec_swap(rays->vals[i], rays->vals[k], nbdims + 1);
975 nbbrays2 =
gauss(rays, nbbrays, nbdims);
976 if (nbbrays2 >= nbdims) {
979 dimrayspace = nbdims - 1 - nbeqs2 - nbbrays2;
981 for (j = 0; j < (
int) nbconstrs; j++) {
995 else if (
status < dimrayspace) {
998 else if (
status == nbrays) {
1007 for (j = 0; j < (
int) nbrays; j++) {
1009 if (
status < dimrayspace) {
1012 else if (
status == nbconstrs + 1) {
1020 constrs2 =
zmat_alloc(nbineqs + nbeqs2 + 1, nbdims + 1);
1021 rays2 =
zmat_alloc(nburays + nbbrays2, nbdims + 1);
1023 zvec_copy(rays->vals[0], rays2->vals[0], (nbdims + 1) * nbbrays2);
1028 trace =
safe_malloc(sat_nbcols *
sizeof(
unsigned));
1030 for (j = nbeqs; j < (
int) nbconstrs; j++) {
1032 for (k = 0; k < (
int) sat_nbcols; k++) {
1035 for (i = nbbrays; i < (
int) nbrays; i++) {
1037 if (!(sat->
vals[i][jx[j]] & bx[j])) {
1038 for (k = 0; k < (
int) sat_nbcols; k++) {
1039 trace[k] |= sat->
vals[i][k];
1045 for (i = nbeqs; i < (
int) nbconstrs; i++) {
1047 !(trace[jx[i]] & bx[i])) {
1066 for (i = nbbrays; i < (
int) nbrays; i++) {
1069 for (k = nbbrays; k < (
int) nbrays; k++) {
1074 for (k = nbbrays; k < (
int) nbrays; k++) {
1078 for (j = nbeqs; j < (
int) nbconstrs; j++) {
1080 if (!(sat->
vals[i][jx[j]] & bx[j])) {
1081 for (k = nbbrays; k < (
int) nbrays; k++) {
1082 trace[k] |= sat->
vals[k][jx[j]] & bx[j];
1088 for (j = nbbrays; j < (
int) nbrays; j++) {
1089 if (
zval_equal_i(rays->vals[j][0], 1) && (i != j) && !trace[j]) {
1098 zvec_copy(rays->vals[i], rays2->vals[nbbrays2 + nburays2],
1107 if (
aux >= (
int) dimrayspace) {
1118 constrs2->
nbrows = nbeqs2 +nbineqs2;
1119 rays2->nbrows = nbbrays2 + nburays2;
1124 *pconstrs = constrs2;
1135 for (i = 0; i < (
int) nbdims; i++) {
1140 *pconstrs = constrs2;
1147 if (constrs->
nbrows != 0) {
1156 unsigned jx1, jx2, bx1, bx2;
1157 for (i = 0, jx1 = 0, bx1 =
MSB; i < rays->
nbrows; i++) {
1158 for (j = 0, jx2 = 0, bx2 =
MSB; j < constrs->
nbrows; j++) {
1159 if (sat->
vals[j][jx1] & bx1) {
1160 tsat->
vals[i][jx2] |= bx2;
1171 zmat_p constrs = *pconstrs;
1172 unsigned nbdims = constrs->
nbcols - 1;
1173 nbmaxrays = nbmaxrays < nbdims ? nbdims : nbmaxrays;
1176 for (i = 0; i < nbmaxrays * (nbdims + 1); i++) {
1179 for (i = 0; i < nbdims; i++) {
1188 chernikova(constrs, rays, sat, nbdims - 1, nbmaxrays,
false);
1197 unsigned nbdims = rays->
nbcols - 1;
1198 nbmaxconstrs = nbmaxconstrs < nbdims ? nbdims : nbmaxconstrs;
1201 for (i = 0; i < nbmaxconstrs * (nbdims + 1); i++) {
1204 for (i = 0; i < nbdims; i++) {
1207 constrs->
nbrows = nbdims;
1212 chernikova(rays, constrs, tsat, nbdims, nbmaxconstrs,
true);
1228 for (; coord != NULL; coord = coord->
succ, j++) {
1237 for (i = 0, coord =
base; coord != NULL; i++, coord = coord->succ) {
1257 for (; (
int) i < sc->nb_eq; i++) {
1260 for (; i < nbrows; i++) {
1266 for (pc = sc->
egalites; pc != NULL; pc = pc->
succ, i++) {
1267 for (j = 1, coord = sc->
base; coord != NULL; coord = coord->
succ, j++) {
1273 for (j = 1, coord = sc->
base; coord != NULL; coord = coord->
succ, j++) {
1278 for (j = 1; j < nbcols - 1; j++) {
1296 for (i = 0; i < constrs->
nbrows; i++) {
1362 for (i = 0; i < rays->
nbrows; i++) {
1371 brays = brays->succ;
1382 urays = urays->
succ;
1393 verts = verts->
succ;
1435 #define NBMAXRAYS (20000)
1436 #define NBMAXCONSTRS (20000)
1478 zmat_p rays1 = NULL, rays2 = NULL, rays = NULL;
1504 unsigned nbrows1 = rays1->
nbrows;
1505 unsigned nbrows2 = rays2->nbrows;
1506 unsigned nbrows = nbrows1 + nbrows2;
1507 unsigned nbcols = rays1->
nbcols;
1510 unsigned i = 0, i1 = 0, i2 = 0, j;
1513 for (j = 0; j < nbcols; j++) {
1518 while (i2 < nbrows2 &&
zval_equal_i(rays2->vals[i2][0], 0) &&
1520 for (j = 0; j < nbcols; j++) {
1521 zval_set(rays->vals[i][j], rays2->vals[i2][j]);
1527 for (j = 0; j < nbcols; j++) {
1532 while (i2 < nbrows2 &&
zval_equal_i(rays2->vals[i2][0], 1) &&
1534 for (j = 0; j < nbcols; j++) {
1535 zval_set(rays->vals[i][j], rays2->vals[i2][j]);
1541 for (j = 0; j < nbcols; j++) {
1546 while (i2 < nbrows2 &&
zval_equal_i(rays2->vals[i2][0], 1) &&
1548 for (j = 0; j < nbcols; j++) {
1549 zval_set(rays->vals[i][j], rays2->vals[i2][j]);
#define zval_mul(z1, z2, z3)
Set z1 to z2 times z3.
#define zval_abs(z1, z2)
Set z1 to the absolute value of z2.
#define zval_mod(z1, z2, z3)
Set z1 to z2 mod z3.
#define zval_clear(z)
Free the space occupied by z.
#define zval_div(z1, z2, z3)
Set z1 to z2/z3.
#define zval_cmp(z1, z2)
Compare z1 and z2.
#define zval_set_i(z, n)
Set the value of z from the signed long n.
#define zval_fprint(stream, z)
Output z on stdio stream stream.
long int zval_t
Type of integer numbers.
#define zval_set(z1, z2)
Set the value of z1 from z2.
#define zval_add(z1, z2, z3)
Set z1 to z2 + z3.
#define zval_equal_i(z, n)
Return non-zero if z and the unsigned long n are equal, zero if they are non-equal.
#define zval_gcd(z1, z2, z3)
Set z1 to the greatest common divisor of z2 and z3.
#define zval_init(z)
Initialize z and set its value to 0.
#define zval_cmp_i(z, n)
Compare z with a signed long n.
#define zval_addmul(z1, z2, z3)
Set z1 to z1 + z2 times z3.
#define zval_neg(z1, z2)
Set z1 to -z2.
#define zval_get_i(z)
Return the value of z as a signed long.
@ any_exception_error
catch all
#define pgcd(a, b)
Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
void const char const char const int
bool bases_strictly_equal_p(Pbase b1, Pbase b2)
Make sure that each dimension of b1 is the same dimension in b2.
bdt base
Current expression.
static int chernikova(zmat_p constrs, zmat_p rays, bmat_p sat, volatile unsigned nbbrays, volatile unsigned nbmaxrays, bool dual)
static Psysteme NOWUNUSED sc_of_rays(zmat_p *prays, Pbase base, unsigned nbmaxconstrs)
static void NOWUNUSED zmat_safe_free(zmat_p zmat)
static Ptsg sg_of_rays(zmat_p rays, Pbase base)
static void zvec_copy(zval_t *zvec1, zval_t *zvec2, unsigned nbvals)
static void zmat_free(zmat_p zmat)
static int zvec_index_first_notzero(zval_t *zvec, unsigned nbvals)
static void sort_rays(zmat_p rays, bmat_p sat, int nbbrays, int nbrays, int *equal_bound, int *sup_bound, unsigned nbcols1, unsigned nbcols2, unsigned bx, unsigned jx)
static void NOWUNUSED safe_free(void *ptr)
static int gauss(zmat_p zmat, int nbeqs, int nbdims)
static void NOWUNUSED bmat_safe_free(bmat_p bmat)
static int get_linear_convex_hull_timeout()
static zmat_p NOWUNUSED constrs_of_sg(Ptsg sg, unsigned nbmaxconstrs)
static void NOWUNUSED bmat_fprint(FILE *stream, bmat_p bmat)
static Ptsg NOWUNUSED sg_of_constrs(zmat_p *pconstrs, Pbase base, unsigned nbmaxrays)
static void zvec_swap(zval_t *zvec1, zval_t *zvec2, unsigned nbvals)
static Psysteme sc_union(Psysteme sc1, Psysteme sc2)
static void bmat_extend(bmat_p bmat, zmat_p zmat, unsigned nbrows)
static void remove_redundants(zmat_p *pconstrs, zmat_p *prays, bmat_p sat)
static zmat_p rays_of_sg(Ptsg sg)
static bmat_p transpose_sat(zmat_p constrs, zmat_p rays, bmat_p sat)
static Psysteme sc_of_constrs(zmat_p constrs, Pbase base)
static zval_t * zvec_alloc(unsigned nbvals)
#define bvec_init(bvec, nbvals)
static zmat_p zmat_alloc(unsigned nbrows, unsigned nbcols)
static Psysteme sc_of_sg(Ptsg sg)
static bool sc_convex_hull_timeout
static zmat_p constrs_of_rays(zmat_p *prays, unsigned nbmaxconstrs)
static void zvec_antiscale(zval_t *zvec1, zval_t *zvec2, zval_t lambda, unsigned nbvals)
static void zmat_set_row(zmat_p zmat, unsigned i, int first, Pvecteur pv, int last, Pbase base)
static zmat_p NOWUNUSED rays_of_sc(Psysteme sc, unsigned nbmaxrays)
static void zvec_normalize(zval_t *zvec, unsigned nbvals)
static void zvec_neg(zval_t *zvec1, zval_t *zvec2, unsigned nbvals)
static void bvec_lor(int *bvec1, int *bvec2, int *bvec3, unsigned nbvals)
static void NOWUNUSED zvec_safe_free(zval_t *zvec, unsigned nbvals)
static int NOWUNUSED zvec_fprint(FILE *stream, zval_t *zvec, unsigned nbvals)
static void zvec_free(zval_t *zvec, unsigned nbvals)
static Ptsg sg_of_sc(Psysteme sc)
static void bmat_free(bmat_p bmat)
static zmat_p rays_of_constrs(zmat_p *pconstrs, unsigned nbmaxrays)
static void zvec_gcd(zval_t *zvec, unsigned nbvals, zval_t *pgcd)
static void *NOWUNUSED safe_realloc(void *ptr, size_t size)
static zmat_p constrs_of_sc(Psysteme sc)
static void zvec_combine(zval_t *zvec1, zval_t *zvec2, zval_t *zvec3, zval_t lambda, zval_t mu, unsigned nbvals)
static void zvec_set_i(zval_t *zvec, long val, unsigned nbvals)
static Pvecteur vecteur_of_zvec(zval_t *zvec, Pbase base)
static void zvec_min_notzero(zval_t *zvec, unsigned nbvals, int *pindex, zval_t *pmin)
static void catch_alarm_sc_convex_hull(int sig NOWUNUSED)
static void *NOWUNUSED safe_malloc(size_t size)
#define bvec_copy(bvec1, bvec2, nbvals)
static void combine(zval_t *zvec1, zval_t *zvec2, zval_t *zvec3, int pos, unsigned nbvals)
static bmat_p bmat_alloc(int nbrows, int nbcols)
static void zmat_extend(zmat_p zmat, unsigned nbrows)
static void NOWUNUSED zmat_fprint(FILE *stream, zmat_p zmat)
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
struct _newgen_struct_status_ * status
static int redundant(Pproblem XX, int i1, int i2)
Psysteme dual(Psysteme sys, Psommet fonct)
Psysteme dual(Psysteme ps, Psommet fonct): Algorithme dual du simplexe avec initialisation des parame...
Pray_dte ray_dte_make(Pvecteur v)
Pray_dte ray_dte_make(Pvecteur v): allocation et initialisation d'une structure ray_dte;.
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...
void pivot(frac *X, frac A, frac B, frac C, frac D, bool ofl_ctrl)
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
#define sg_nbre_sommets(sg)
nombre de sommets: int sg_nbre_sommets(Ptsg)
#define sg_nbre_droites(sg)
nombre de droites: int sg_nbre_droites(Ptsg)
#define sg_nbre_rayons(sg)
nombre de rayons: int sg_nbre_rayons(Ptsg)
Ptsg sg_new()
Ptsg sg_new(): allocation d'un systeme generateur et initialisation a la valeur ensemble vide.
void sg_rm(Ptsg sg)
void sg_rm(Ptsg sg): liberation de l'espace memoire occupe par un systeme generateur
Psommet sommet_make(Value d, Pvecteur v)
Psommet sommet_make(int d, Pvecteur v): allocation et initialisation d'un sommet de denominateur d et...
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
struct Svecteur * vecteur
structure de donnees Sommet
Representation d'un systeme generateur par trois ensembles de sommets de rayons et de droites.
@ empty
b1 < bj -> h1/hj = empty
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define base_dimension(b)
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Pbase base_copy(Pbase b)
Direct duplication.
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...