Main Page   Compound List   File List   Compound Members   File Members  

polyparam.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <polylib/polylib.h>

Go to the source code of this file.

Compounds

struct  SatMatrix

Functions

void traite_m_face ()
void scan_m_face ()
PolyhedronPDomainIntersection (Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
PolyhedronPDomainDifference (Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
int TestRank (Matrix *Mat)
SatMatrixSMAlloc (int rows, int cols)
void SMFree (SatMatrix *matrix)
PolyhedronAdd_CEqualities (Polyhedron *D)
void traite_m_face (Polyhedron *D, int *mf)
int count_sat (unsigned int *mf)
void scan_m_face (int pos, int nb_un, Polyhedron *D, unsigned int *mf)
SatMatrixPoly2Sat (Polyhedron *Pol, unsigned int **L)
Param_PolyhedronGenParamPolyhedron (Polyhedron *Pol)
MatrixPreElim_Columns (Polyhedron *E, int *p, int *ref, int m)
PolyhedronElim_Columns (Polyhedron *A, Polyhedron *E, int *p, int *ref)
Param_PolyhedronFind_m_faces (Polyhedron **Di, Polyhedron *C, int keep_dom, int working_space, Polyhedron **CEq, Matrix **CT)
void Compute_PDomains (Param_Domain *PD, int nb_domains, int working_space)
Param_PolyhedronPolyhedron2Param_Vertices (Polyhedron *Din, Polyhedron *Cin, int working_space)
void Param_Vertices_Free (Param_Vertices *PV)
void Print_Vertex (FILE *DST, Matrix *V, char **param_names)
MatrixVertexCT (Matrix *V, Matrix *CT)
void Print_Domain (FILE *DST, Polyhedron *D, char **pname)
void Param_Vertices_Print (FILE *DST, Param_Vertices *PV, char **param_names)
Param_PolyhedronPolyhedron2Param_Domain (Polyhedron *Din, Polyhedron *Cin, int working_space)
Param_PolyhedronPolyhedron2Param_SimplifiedDomain (Polyhedron **Din, Polyhedron *Cin, int working_space, Polyhedron **CEq, Matrix **CT)
void Param_Domain_Free (Param_Domain *PD)
void Param_Polyhedron_Free (Param_Polyhedron *P)

Variables

int m
int m_dim
int n
int ws
int nr
PolyhedronCEqualities
SatMatrixSat
int * egalite
MatrixXi
MatrixPi
MatrixPiTest
MatrixPiInv
MatrixRaysDi
int KD
int nbPV
Param_VerticesPV_Result
Param_DomainPDomains
int cntbit [256]


Function Documentation

Polyhedron* Add_CEqualities Polyhedron   D [static]
 

Definition at line 276 of file polyparam.c.

References AddConstraints(), polyhedron::Constraint, Domain_Free(), emptyQ, polyhedron::NbConstraints, polyhedron::next, Polyhedron_Copy(), and ws.

Referenced by Polyhedron2Param_Domain(), and traite_m_face().

void Compute_PDomains Param_Domain   PD,
int    nb_domains,
int    working_space
 

Definition at line 1194 of file polyparam.c.

References _Param_Domain::Domain, Domain_Free(), emptyQ, _Param_Domain::F, MSB, polyhedron::NbEq, NEXT, _Param_Domain::next, P_VALUE_FMT, PDomainDifference(), PDomainIntersection(), and Polyhedron_Print().

int count_sat unsigned int *    mf [static]
 

Definition at line 484 of file polyparam.c.

References cntbit, and nr.

Referenced by scan_m_face().

Polyhedron* Elim_Columns Polyhedron   A,
Polyhedron   E,
int *    p,
int *    ref
 

Definition at line 850 of file polyparam.c.

References polyhedron::Constraint, Constraints2Polyhedron(), Matrix_Alloc(), Matrix_Free(), Matrix_Print(), matrix::NbColumns, polyhedron::NbEq, matrix::NbRows, matrix::p, P_VALUE_FMT, Polyhedron2Constraints(), Polyhedron_Print(), value_assign, value_clear, value_init, value_multiply, value_notzero_p, value_substract, and ws.

Referenced by Find_m_faces().

Param_Polyhedron* Find_m_faces Polyhedron **    Di,
Polyhedron   C,
int    keep_dom,
int    working_space,
Polyhedron **    CEq,
Matrix **    CT
 

Definition at line 914 of file polyparam.c.

References align_context(), polyhedron::Constraint, Constraints2Polyhedron(), _Param_Polyhedron::D, polyhedron::Dimension, Domain_Free(), DomainAddRays(), DomainIntersection(), DomainSimplify(), egalite, Elim_Columns(), emptyQ, GenParamPolyhedron(), KD, m, m_dim, Matrix_Alloc(), Matrix_Free(), Matrix_Print(), n, polyhedron::NbBid, polyhedron::NbConstraints, polyhedron::NbEq, nbPV, polyhedron::NbRays, _Param_Polyhedron::nbV, nr, matrix::p, P_VALUE_FMT, Poly2Sat(), Polyhedron_Free(), Polyhedron_Print(), PreElim_Columns(), scan_m_face(), SMFree(), Universe_Polyhedron(), _Param_Polyhedron::V, value_assign, value_notzero_p, value_set_si, Vector_Copy(), Vector_Set(), and ws.

Referenced by Polyhedron2Param_Domain(), Polyhedron2Param_SimplifiedDomain(), and Polyhedron2Param_Vertices().

Param_Polyhedron* GenParamPolyhedron Polyhedron   Pol
 

Definition at line 709 of file polyparam.c.

References _Param_Polyhedron::D, _Param_Domain::Domain, _Param_Vertex::Domain, _Param_Domain::F, Matrix_Alloc(), matrix::NbColumns, matrix::NbRows, _Param_Polyhedron::nbV, _Param_Domain::next, _Param_Vertex::next, matrix::p, Polyhedron2Rays(), Universe_Polyhedron(), _Param_Polyhedron::V, value_assign, value_notone_p, value_set_si, value_zero_p, and _Param_Vertex::Vertex.

void Param_Domain_Free Param_Domain   PD
 

Definition at line 1660 of file polyparam.c.

References _Param_Domain::Domain, Domain_Free(), _Param_Domain::F, and _Param_Domain::next.

void Param_Polyhedron_Free Param_Polyhedron   P
 

Definition at line 1677 of file polyparam.c.

References _Param_Polyhedron::D, Param_Domain_Free(), Param_Vertices_Free(), and _Param_Polyhedron::V.

void Param_Vertices_Free Param_Vertices   PV
 

Definition at line 1391 of file polyparam.c.

References _Param_Vertex::Domain, Matrix_Free(), _Param_Vertex::next, and _Param_Vertex::Vertex.

void Param_Vertices_Print FILE *    DST,
Param_Vertices   PV,
char **    param_names
 

Definition at line 1560 of file polyparam.c.

References Constraints2Polyhedron(), _Param_Vertex::Domain, Domain_Free(), _Param_Vertex::next, Print_Domain(), Print_Vertex(), and _Param_Vertex::Vertex.

Polyhedron* PDomainDifference Polyhedron   Pol1,
Polyhedron   Pol2,
unsigned    NbMaxRays
 

Definition at line 86 of file polyparam.c.

References AddPolyToDomain(), polyhedron::Constraint, polyhedron::Dimension, Domain_Free(), emptyQ, polyhedron::NbConstraints, polyhedron::NbEq, polyhedron::next, Polyhedron_Free(), and SubConstraint().

Polyhedron* PDomainIntersection Polyhedron   Pol1,
Polyhedron   Pol2,
unsigned    NbMaxRays
 

Definition at line 50 of file polyparam.c.

References AddConstraints(), AddPolyToDomain(), polyhedron::Constraint, polyhedron::Dimension, polyhedron::NbConstraints, polyhedron::NbEq, polyhedron::next, and Polyhedron_Free().

SatMatrix* Poly2Sat Polyhedron   Pol,
unsigned int **    L
[static]
 

Definition at line 656 of file polyparam.c.

References polyhedron::Constraint, polyhedron::Dimension, MSB, polyhedron::NbConstraints, polyhedron::NbRays, NEXT, nr, SatMatrix::p, SatMatrix::p_init, polyhedron::Ray, SMAlloc(), value_addto, value_clear, value_init, value_multiply, value_set_si, and value_zero_p.

Referenced by Find_m_faces().

Param_Polyhedron* Polyhedron2Param_Domain Polyhedron   Din,
Polyhedron   Cin,
int    working_space
 

Definition at line 1585 of file polyparam.c.

References Add_CEqualities(), Compute_PDomains(), _Param_Polyhedron::D, polyhedron::Dimension, _Param_Domain::Domain, Find_m_faces(), _Param_Polyhedron::nbV, and _Param_Domain::next.

Param_Polyhedron* Polyhedron2Param_SimplifiedDomain Polyhedron **    Din,
Polyhedron   Cin,
int    working_space,
Polyhedron **    CEq,
Matrix **    CT
 

Definition at line 1621 of file polyparam.c.

References Compute_PDomains(), _Param_Polyhedron::D, polyhedron::Dimension, Find_m_faces(), and _Param_Polyhedron::nbV.

Param_Polyhedron* Polyhedron2Param_Vertices Polyhedron   Din,
Polyhedron   Cin,
int    working_space
 

Definition at line 1365 of file polyparam.c.

References Find_m_faces(), and _Param_Polyhedron::nbV.

Matrix* PreElim_Columns Polyhedron   E,
int *    p,
int *    ref,
int    m
 

Definition at line 777 of file polyparam.c.

References polyhedron::Constraint, polyhedron::Dimension, m, Matrix_Alloc(), Matrix_Print(), matrix::NbColumns, polyhedron::NbEq, matrix::NbRows, matrix::p, P_VALUE_FMT, Polyhedron_Print(), value_notzero_p, value_set_si, and value_zero_p.

Referenced by Find_m_faces().

void Print_Domain FILE *    DST,
Polyhedron   D,
char **    pname
 

Definition at line 1510 of file polyparam.c.

References polyhedron::Constraint, polyhedron::Dimension, polyhedron::NbConstraints, polyhedron::next, Print_Domain(), value_mone_p, value_notzero_p, value_one_p, value_pos_p, and value_print.

void Print_Vertex FILE *    DST,
Matrix   V,
char **    param_names
 

Definition at line 1407 of file polyparam.c.

References Gcd(), matrix::NbColumns, matrix::NbRows, matrix::p, value_absolute, value_clear, value_division, value_init, value_mone_p, value_notone_p, value_notzero_p, value_posz_p, and value_print.

void scan_m_face int    pos,
int    nb_un,
Polyhedron   D,
unsigned int *    mf
[static]
 

Definition at line 541 of file polyparam.c.

References count_sat(), egalite, m, m_dim, n, polyhedron::NbConstraints, nr, SatMatrix::p, scan_m_face(), and traite_m_face().

void scan_m_face   [static]
 

Referenced by Find_m_faces(), and scan_m_face().

SatMatrix* SMAlloc int    rows,
int    cols
[static]
 

Definition at line 207 of file polyparam.c.

References assert, SatMatrix::NbColumns, SatMatrix::NbRows, SatMatrix::p, and SatMatrix::p_init.

Referenced by BuildSat(), Constraints2Polyhedron(), FindSimple(), Poly2Sat(), Rays2Polyhedron(), and TransformSat().

void SMFree SatMatrix   matrix [static]
 

Definition at line 231 of file polyparam.c.

References SatMatrix::p, and SatMatrix::p_init.

Referenced by AddConstraints(), AddRays(), BuildSat(), Constraints2Polyhedron(), Find_m_faces(), FindSimple(), Rays2Polyhedron(), SimplifyConstraints(), and SubConstraint().

int TestRank Matrix   Mat [static]
 

Definition at line 129 of file polyparam.c.

References Gcd(), matrix::NbColumns, matrix::NbRows, matrix::p, value_assign, value_clear, value_division, value_init, value_multiply, value_notzero_p, value_substract, and value_zero_p.

Referenced by traite_m_face().

void traite_m_face Polyhedron   D,
int *    mf
[static]
 

Definition at line 305 of file polyparam.c.

References Add_CEqualities(), _Param_Domain::Domain, _Param_Vertex::Domain, _Param_Domain::F, KD, m, MatInverse(), Matrix_Alloc(), Matrix_Print(), MSB, n, matrix::NbColumns, nbPV, polyhedron::NbRays, matrix::NbRows, _Param_Domain::next, _Param_Vertex::next, NEXT, matrix::p, P_VALUE_FMT, Polyhedron2Constraints(), Polyhedron_Free(), Polyhedron_Print(), rat_prodmat(), polyhedron::Ray, Rays2Polyhedron(), TestRank(), value_assign, Vector_Copy(), _Param_Vertex::Vertex, and ws.

void traite_m_face   [static]
 

Referenced by scan_m_face().

Matrix* VertexCT Matrix   V,
Matrix   CT
 

Definition at line 1480 of file polyparam.c.

References Matrix_Alloc(), matrix::NbColumns, matrix::NbRows, matrix::p, value_assign, value_notzero_p, and value_set_si.


Variable Documentation

Polyhedron* CEqualities [static]
 

Definition at line 251 of file polyparam.c.

int cntbit[256]
 

Initial value:

 {                              
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,

1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,

1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,

2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 }

Definition at line 463 of file polyparam.c.

Referenced by count_sat().

int* egalite [static]
 

Definition at line 253 of file polyparam.c.

Referenced by Find_m_faces(), and scan_m_face().

int KD [static]
 

Definition at line 260 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

int m [static]
 

Definition at line 245 of file polyparam.c.

Referenced by Find_m_faces(), PreElim_Columns(), scan_m_face(), and traite_m_face().

int m_dim [static]
 

Definition at line 246 of file polyparam.c.

Referenced by Find_m_faces(), and scan_m_face().

int n [static]
 

Definition at line 247 of file polyparam.c.

Referenced by Find_m_faces(), scan_m_face(), and traite_m_face().

int nbPV [static]
 

Definition at line 263 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

int nr [static]
 

Definition at line 249 of file polyparam.c.

Referenced by count_sat(), Find_m_faces(), Poly2Sat(), and scan_m_face().

Param_Domain* PDomains [static]
 

Definition at line 265 of file polyparam.c.

Matrix * Pi [static]
 

Definition at line 254 of file polyparam.c.

Matrix* PiInv [static]
 

Definition at line 256 of file polyparam.c.

Matrix* PiTest [static]
 

Definition at line 255 of file polyparam.c.

Param_Vertices* PV_Result [static]
 

Definition at line 264 of file polyparam.c.

Matrix* RaysDi [static]
 

Definition at line 258 of file polyparam.c.

SatMatrix* Sat [static]
 

Definition at line 252 of file polyparam.c.

int ws [static]
 

Definition at line 248 of file polyparam.c.

Referenced by Add_CEqualities(), Elim_Columns(), Find_m_faces(), and traite_m_face().

Matrix* Xi [static]
 

Definition at line 254 of file polyparam.c.


Generated on Mon Mar 15 10:59:52 2004 for polylib by doxygen1.2.18