41 #define MALLOC(s,t,f) malloc(s)
42 #define FREE(p,t,f) free(p)
77 for (vect=(*pvect); vect!=NULL; vect=vect->
succ)
112 for (pvprec = NULL, pvcour = (*ppv); pvcour != NULL;) {
114 if (pvcour->
var == v) {
116 if (pvprec != NULL) {
119 pvcour = pvprec->
succ = pvcour->
succ;
132 pvcour = pvcour->
succ;
154 for (pvcour = (*ppv); pvcour != NULL; pvcour = pvcour->
succ) {
155 if (pvcour->
var == var) {
174 for (pvcour = (*ppv); pvcour != NULL; pvcour = pvcour->
succ) {
175 if (pvcour->
var == v_old){
232 for ( ; vect != NULL ; vect = vect->
succ)
233 if (
var_of(vect) == var) {
253 for (; vect != NULL ; vect = vect->
succ) {
274 for(coord = v; coord!=NULL; coord=coord->
succ)
301 if ( n==0 || n==1 )
return;
307 for (v=*pv, point=table; v!=(
Pvecteur)NULL; v=v->
succ, point++)
314 qsort(table, n,
sizeof(
Pvecteur),(
int (*)()) compare);
318 for (point=table; n>1; point++, n--)
319 (*point)->succ=*(point+1);
325 *pv=*table;
free(table);
355 return(strcmp((
char *)&
var_of(*pv1), (
char *)&
var_of(*pv2)));
379 for(vc=v; vc; vc=vc->
succ)
491 for(pv1 = v1, pv2 = v2;
564 cmp = compare(&pv1, &pv2);
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
#define value_mone_p(val)
#define value_sign(v)
trian operators on values
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
#define value_notzero_p(val)
#define value_uminus(val)
unary operators on values
void const char const char const int
#define value_notone_p(val)
#define value_zero_p(val)
#define value_addto(ref, val)
Value vect_pgcd_all(Pvecteur v)
Value vect_pgcd(Pvecteur v): calcul du pgcd de tous les coefficients non nul d'un vecteur v.
bool vect_equal(Pvecteur v1, Pvecteur v2)
bool vect_equal(Pvecteur v1, Pvecteur v2): test a egalite de deux vecteurs
int vect_size(Pvecteur v)
package vecteur - reductions
bool variable_equal(Variable v1, Variable v2)
package vecteur - routines sur les variables
Pvecteur vect_chain(Pvecteur v_in, Variable var, Value coeff)
package vecteur routines internes au package
Pvecteur vect_div(Pvecteur v, Value x)
Pvecteur vect_div(Pvecteur v, Value x): division du vecteur v par le scalaire x, si x est different d...
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
struct Svecteur * Pvecteur
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define VECTEUR
package sur les vecteurs creux et les bases
#define VECTEUR_UNDEFINED_P(v)
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
void vect_erase_var(Pvecteur *ppv, Variable v)
void vect_erase_var(Pvecteur * ppv, Variable v): projection du vecteur *ppv selon la direction v (i....
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...
int vect_lexicographic_compare(Pvecteur v1, Pvecteur v2, int(*compare)(Pvecteur *, Pvecteur *))
qsort() is not safe if the comparison function is not antisymmetric.
Pvecteur vect_del_var(Pvecteur v_in, Variable var)
Pvecteur vect_del_var(Pvecteur v_in, Variable var): allocation d'un nouveau vecteur egal a la project...
int vect_compare(Pvecteur *pv1, Pvecteur *pv2)
for qsort, returns:
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
void vect_sort_in_place(Pvecteur *pv, int *compare)
void vect_sort_in_place(pv, compare) Pvecteur *pv; int (*compare)(Pvecteur *, Pvecteur *);
Variable vect_one_coeff_if_any(Pvecteur v)
int vect_lexicographic_unsafe_compare_generic(Pvecteur v1, Pvecteur v2, int(*compare)(Pvecteur *, Pvecteur *), bool is_equation __attribute__((unused)))
This function is a trade-off between a real lexicographic sort and a prettyprinting function also use...
void vect_chg_coeff(Pvecteur *ppv, Variable var, Value val)
void vect_chg_coeff(Pvecteur *ppv, Variable var, Value val): mise de la coordonnee var du vecteur *pp...
bool vect_contains_variable_p(Pvecteur v, Variable var)
bool vect_contains_variable_p(Pvecteur v, Variable var) BA 19/05/94 input : a vector and a variable o...
void Pvecteur_separate_on_sign(Pvecteur v, Pvecteur *pvpos, Pvecteur *pvneg)
void Pvecteur_separate_on_sign(v, pvpos, pvneg) Pvecteur v, *pvpos, *pvneg;
static int vect_lexicographic_coefficient_comparison(Pvecteur v1, Pvecteur v2)
The two sparse vectors are assumed to have exactly the same structure, the same non-zero components i...
Pvecteur vect_sign(Pvecteur v)
Pvecteur vect_sign(Pvecteur v): application de l'operation signe au vecteur v.
bool vect_common_variables_p(Pvecteur v1, Pvecteur v2)
bool vect_common_variables_p(Pvecteur v1, v2) BA 19/05/94 input : two vectors.
int vect_lexicographic_compare2(Pvecteur v1, Pvecteur v2, int(*compare)(Pvecteur *, Pvecteur *))
Version for inequalities.
Pvecteur vect_sort(Pvecteur v, int *compare)
Pvecteur vect_sort(v, compare) Pvecteur v; int (*compare)();.
void vect_chg_var(Pvecteur *ppv, Variable v_old, Variable v_new)
void vect_chg_var(Pvecteur *ppv, Variable v_old, Variable v_new) replace the variable v_old by v_new
Value vect_coeff_sum(Pvecteur vect)
Value vect_coeff_sum(Pvecteur vect): coefficient sum de tout les val de ce vecteur (devrait etre dans...
int vect_lexicographic_unsafe_compare2(Pvecteur v1, Pvecteur v2, int(*compare)(Pvecteur *, Pvecteur *))
void vect_normalize(Pvecteur v)
void vect_normalize(Pvecteur v): division de tous les coefficients de v par leur pgcd; "normalisation...
int vect_lexicographic_unsafe_compare(Pvecteur v1, Pvecteur v2, int(*compare)(Pvecteur *, Pvecteur *))