PIPS
|
#include <stdio.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
#include "matrix.h"
#include "matrice.h"
Go to the source code of this file.
Functions | |
void | sys_matrice_index (Psysteme sc, Pbase base_index, matrice A, int n, int m) |
package sparse_sc: conversion de systemes representes par des matrices pleines en systemes representes par des contraintes creuses More... | |
void | matrice_index_sys (Psysteme sc, Pbase base_index, matrice AG, int n, int m) |
void matrice_index_sys(Psysteme sc, Pbase base_index, matrice AG, int n, int m) replace the coefficients of the index variables in sc by their new coefficients in the matrix AG[m,n]. More... | |
void | sc_to_matrices (Psysteme ps, Pbase base_index, matrice A, matrice B, int n, int m) |
Creation de la matrice A correspondant au systeme lineaire et de la matrice correspondant a la partie constante B Le systeme est suppose ne pas contenir de constantes symboliques. More... | |
void | matrices_to_sc (Psysteme ps, Pbase base_index, matrice A, matrice B, int n, int m) |
void | loop_sc_to_matrices (Psysteme ps, Pbase index_base, Pbase const_base, matrice A, matrice B, int n, int m1, int m2) |
Creation de la matrice A correspondant au systeme lineaire et de la matrice correspondant a la partie constante B Le systeme peut contenir des constantes symboliques. More... | |
void | matrices_to_loop_sc (Psysteme ps, Pbase index_base, Pbase const_base, matrice A, matrice B, int n, int m1, int m2) |
void | constraints_to_matrices (Pcontrainte pc, Pbase b, Pmatrix A, Pmatrix B) |
======================================================================= More... | |
void | matrices_to_constraints (Pcontrainte *pc, Pbase b, Pmatrix A, Pmatrix B) |
======================================================================= More... | |
void | constraints_with_sym_cst_to_matrices (Pcontrainte pc, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B) |
======================================================================= More... | |
void | matrices_to_constraints_with_sym_cst (Pcontrainte *pc, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B) |
======================================================================= More... | |
void constraints_to_matrices | ( | Pcontrainte | pc, |
Pbase | b, | ||
Pmatrix | A, | ||
Pmatrix | B | ||
) |
=======================================================================
pc | c |
Definition at line 461 of file sys_matrice_conv.c.
References B, CONTRAINTE_UNDEFINED_P, eq, MATRIX_ELEM, matrix_nulle(), Scontrainte::succ, Svecteur::succ, vect_coeff(), Scontrainte::vecteur, and vecteur_var.
Referenced by extract_lattice(), region_sc_minimal(), and transformer_to_1D_lattice().
void constraints_with_sym_cst_to_matrices | ( | Pcontrainte | pc, |
Pbase | index_base, | ||
Pbase | const_base, | ||
Pmatrix | A, | ||
Pmatrix | B | ||
) |
=======================================================================
void constraints_with_sym_cst_to_matrices(Pcontrainte pc, Pbase index_base const_base, matrice A B, int n m1 m2):
constructs the matrices "A" and "B" corresponding to the linear constraints "pc", so: A.ib + B1.cb + B2 = 0 <=> pc(ib, cb) = 0:
B = ( B1 | B2 ), B2 of dimension (n,1).
The basis "ib" gives the variables of the linear system. The basis "cb" gives the symbolic constants of the linear system.
The matrices "A" and "B" are supposed to have been already allocated in memory, respectively of dimension (n, m1) and (n, m2).
"n" must be the exact number of constraints in "pc". "m1" must be the exact number of variables in "ib". "m2" must be equal to the number of symbolic constants (in "cb") PLUS ONE (the actual constant).
pc | c |
index_base | ndex_base |
const_base | onst_base |
Definition at line 572 of file sys_matrice_conv.c.
References B, CONTRAINTE_UNDEFINED_P, eq, MATRIX_ELEM, matrix_nulle(), Scontrainte::succ, Svecteur::succ, TCST, vect_coeff(), vect_size(), Scontrainte::vecteur, and vecteur_var.
Referenced by make_reindex().
void loop_sc_to_matrices | ( | Psysteme | ps, |
Pbase | index_base, | ||
Pbase | const_base, | ||
matrice | A, | ||
matrice | B, | ||
int | n, | ||
int | m1, | ||
int | m2 | ||
) |
Creation de la matrice A correspondant au systeme lineaire et de la matrice correspondant a la partie constante B Le systeme peut contenir des constantes symboliques.
Dans ce cas, la base index_base ne doit contenir que les variables etant des indices de boucles et la base const_base les constantes symboliques. La matrice B represente toutes les contraintes sur les constantes.
Les parametres de la fonction :
Psysteme ps : systeme lineaire !int A[] : matrice !int B[] : matrice int n : nombre de lignes de la matrice int m : nombre de colonnes de la matrice
ps | s |
index_base | ndex_base |
const_base | onst_base |
m1 | 1 |
m2 | 2 |
Definition at line 278 of file sys_matrice_conv.c.
References ACCESS, B, CONTRAINTE_UNDEFINED_P, eq, matrice_nulle(), Scontrainte::succ, Svecteur::succ, TCST, vect_coeff(), Scontrainte::vecteur, and vecteur_var.
Referenced by sc_image_computation().
void matrice_index_sys(Psysteme sc, Pbase base_index, matrice AG, int n, int m) replace the coefficients of the index variables in sc by their new coefficients in the matrix AG[m,n].
Modif: taken into account the order of system of constraints.
vect_chg_coeff(&pc->vecteur, pb->var, ACCESS(AG,m,m-i+1,j));
Obsolete code: this old code was implemented assumming the order of system of constraints had changed because of _dup version. Thanks to _copy version, it's now straight. However, there'll be an incompatiblity if exist some calls of this function (which is already obsolete since it uses matrice instead of matrix) outside hyperplane.c. changed by DN.
sc | c |
base_index | ase_index |
AG | G |
Definition at line 80 of file sys_matrice_conv.c.
References ACCESS, base_find_variable(), DENOMINATOR, Svecteur::succ, Svecteur::val, value_gt, VALUE_ONE, value_product, Svecteur::var, VARIABLE_UNDEFINED, vect_chg_coeff(), and Scontrainte::vecteur.
Referenced by hyperplane(), and unimodular().
void matrices_to_constraints | ( | Pcontrainte * | pc, |
Pbase | b, | ||
Pmatrix | A, | ||
Pmatrix | B | ||
) |
=======================================================================
build the constant terme if it is not null
build a new vecteur if there is a null constant term
the constraints are in reverse order
pc | c |
Definition at line 501 of file sys_matrice_conv.c.
References B, contrainte_new(), cp, MATRIX_DENOMINATOR, MATRIX_ELEM, MATRIX_NB_COLUMNS, MATRIX_NB_LINES, Svecteur::succ, TCST, value_mult, value_notzero_p, vect_chg_coeff(), vect_new(), and vecteur_var.
Referenced by extract_lattice(), and region_sc_minimal().
void matrices_to_constraints_with_sym_cst | ( | Pcontrainte * | pc, |
Pbase | index_base, | ||
Pbase | const_base, | ||
Pmatrix | A, | ||
Pmatrix | B | ||
) |
=======================================================================
build the constant terme if it exists
build a new vecteur if there is not constant term
build a new vecteur if there is not constant term
pc | c |
index_base | ndex_base |
const_base | onst_base |
Definition at line 621 of file sys_matrice_conv.c.
References B, base_union(), contrainte_new(), cp, MATRIX_DENOMINATOR, MATRIX_ELEM, MATRIX_NB_COLUMNS, MATRIX_NB_LINES, Svecteur::succ, TCST, value_mult, value_notzero_p, vect_chg_coeff(), vect_new(), and vecteur_var.
void matrices_to_loop_sc | ( | Psysteme | ps, |
Pbase | index_base, | ||
Pbase | const_base, | ||
matrice | A, | ||
matrice | B, | ||
int | n, | ||
int | m1, | ||
int | m2 | ||
) |
create the variables
ajout des variables supplementaires utiles
build the constant terme if it exists
build a new vecteur if there is not constant term
build a new vecteur if there is not constant term
ps | s |
index_base | ndex_base |
const_base | onst_base |
m1 | 1 |
m2 | 2 |
Definition at line 338 of file sys_matrice_conv.c.
References ACCESS, B, BASE_NULLE, base_reversal(), contrainte_new(), cp, creat_new_var(), DENOMINATOR, Svecteur::succ, TCST, value_mult, value_notzero_p, VALUE_ONE, vect_add(), vect_chg_coeff(), vect_dup(), vect_new(), vect_size(), VECTEUR_NUL_P, VECTEUR_UNDEFINED, and vecteur_var.
Referenced by sc_image_computation().
create the variables
ajout des variables supplementaires utiles
build the constant terme if it exists
build a new vecteur if there is not constant term
ps | s |
base_index | ase_index |
Definition at line 185 of file sys_matrice_conv.c.
References ACCESS, B, base_reversal(), contrainte_new(), cp, creat_new_var(), DENOMINATOR, Svecteur::succ, TCST, value_mult, value_notzero_p, VALUE_ONE, vect_chg_coeff(), vect_dup(), vect_new(), VECTEUR_NUL_P, VECTEUR_UNDEFINED_P, and vecteur_var.
Creation de la matrice A correspondant au systeme lineaire et de la matrice correspondant a la partie constante B Le systeme est suppose ne pas contenir de constantes symboliques.
Les parametres de la fonction :
Psysteme ps : systeme lineaire !int A[] : matrice !int B[] : matrice int n : nombre de lignes de la matrice int m : nombre de colonnes de la matrice
ps | s |
base_index | ase_index |
Definition at line 134 of file sys_matrice_conv.c.
References ACCESS, B, CONTRAINTE_UNDEFINED_P, eq, matrice_nulle(), Scontrainte::succ, Svecteur::succ, vect_coeff(), Scontrainte::vecteur, and vecteur_var.
Referenced by make_primal().
package sparse_sc: conversion de systemes representes par des matrices pleines en systemes representes par des contraintes creuses
Warning! Do not modify this file that is automatically generated!
Corinne Ancourt void sys_matrice_index(Psysteme sc, Pbase base_index, matrice A, int n, int m) create the matrix A [m,n] made with the coefficients of the index variables
sc | c |
base_index | ase_index |
Definition at line 53 of file sys_matrice_conv.c.
References ACCESS, matrice_nulle(), Scontrainte::succ, Svecteur::succ, Svecteur::var, vect_coeff(), and Scontrainte::vecteur.
Referenced by hyperplane(), and unimodular().