polylib 5.22.8
polyparam.c File Reference
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <polylib/polylib.h>

Go to the source code of this file.

Classes

struct  SatMatrix
 

Macros

#define INT_BITS   (sizeof(unsigned) * 8)
 

Functions

static void traite_m_face (Polyhedron *, unsigned int *, unsigned int *)
 
static void scan_m_face (int, int, Polyhedron *, unsigned int *)
 
PolyhedronPDomainIntersection (Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
 
PolyhedronPDomainDifference (Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
 
static int TestRank (Matrix *Mat)
 
static SatMatrixSMAlloc (int rows, int cols)
 
static void SMPrint (SatMatrix *matrix)
 
static void SMFree (SatMatrix *matrix)
 
static PolyhedronAdd_CEqualities (Polyhedron *D)
 
unsigned int * int_array2bit_vector (unsigned int *array, int n)
 
static int count_sat (unsigned int *mf)
 
static int bit_vector_includes (unsigned int *bv, int len, unsigned int *part)
 
static SatMatrixPoly2Sat (Polyhedron *Pol, unsigned int **L)
 
Param_PolyhedronGenParamPolyhedron (Polyhedron *Pol, Matrix *Rays)
 
MatrixPreElim_Columns (Polyhedron *E, int *p, int *ref, int m)
 
PolyhedronElim_Columns (Polyhedron *A, Polyhedron *E, int *p, int *ref)
 
static PolyhedronRecession_Cone (Polyhedron *P, unsigned nvar, unsigned MaxRays)
 
static int ComputeNPLinesRays (int n, Polyhedron *D1, Matrix **Rays)
 
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, const char **param_names)
 
MatrixVertexCT (Matrix *V, Matrix *CT)
 
void Print_Domain (FILE *DST, Polyhedron *D, const char **pname)
 
void Param_Vertices_Print (FILE *DST, Param_Vertices *PV, const 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)
 
void Param_Polyhedron_Scale_Integer (Param_Polyhedron *PP, Polyhedron **P, Value *det, unsigned MaxRays)
 

Variables

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

Macro Definition Documentation

◆ INT_BITS

#define INT_BITS   (sizeof(unsigned) * 8)

Definition at line 330 of file polyparam.c.

Function Documentation

◆ Add_CEqualities()

◆ bit_vector_includes()

static int bit_vector_includes ( unsigned int *  bv,
int  len,
unsigned int *  part 
)
static

Definition at line 543 of file polyparam.c.

Referenced by scan_m_face().

◆ Compute_PDomains()

◆ ComputeNPLinesRays()

static int ComputeNPLinesRays ( int  n,
Polyhedron D1,
Matrix **  Rays 
)
static

◆ count_sat()

static int count_sat ( unsigned int *  mf)
static

Definition at line 530 of file polyparam.c.

References cntbit, and nr.

Referenced by scan_m_face().

◆ Elim_Columns()

◆ Find_m_faces()

◆ GenParamPolyhedron()

◆ int_array2bit_vector()

unsigned int * int_array2bit_vector ( unsigned int *  array,
int  n 
)

Definition at line 332 of file polyparam.c.

References assert, INT_BITS, MSB, n, and NEXT.

Referenced by traite_m_face().

◆ Param_Domain_Free()

void Param_Domain_Free ( Param_Domain PD)

◆ Param_Polyhedron_Free()

◆ Param_Polyhedron_Scale_Integer()

◆ Param_Vertices_Free()

void Param_Vertices_Free ( Param_Vertices PV)

◆ Param_Vertices_Print()

void Param_Vertices_Print ( FILE *  DST,
Param_Vertices PV,
const char **  param_names 
)

◆ PDomainDifference()

◆ PDomainIntersection()

◆ Poly2Sat()

◆ Polyhedron2Param_Domain()

◆ Polyhedron2Param_SimplifiedDomain()

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

◆ Polyhedron2Param_Vertices()

Param_Polyhedron * Polyhedron2Param_Vertices ( Polyhedron Din,
Polyhedron Cin,
int  working_space 
)

Definition at line 1531 of file polyparam.c.

References Find_m_faces(), _Param_Polyhedron::nbV, POL_ENSURE_FACETS, and POL_ENSURE_VERTICES.

Referenced by main().

◆ PreElim_Columns()

◆ Print_Domain()

◆ Print_Vertex()

void Print_Vertex ( FILE *  DST,
Matrix V,
const char **  param_names 
)

◆ Recession_Cone()

static Polyhedron * Recession_Cone ( Polyhedron P,
unsigned  nvar,
unsigned  MaxRays 
)
static

◆ scan_m_face()

static void scan_m_face ( int  pos,
int  nb_un,
Polyhedron D,
unsigned int *  mf 
)
static

◆ SMAlloc()

static SatMatrix * SMAlloc ( int  rows,
int  cols 
)
static

Definition at line 220 of file polyparam.c.

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

Referenced by Poly2Sat().

◆ SMFree()

static void SMFree ( SatMatrix matrix)
static

Definition at line 260 of file polyparam.c.

References matrix::p.

Referenced by Find_m_faces().

◆ SMPrint()

static void SMPrint ( SatMatrix matrix)
static

Definition at line 244 of file polyparam.c.

References matrix::NbColumns, matrix::NbRows, and matrix::p.

Referenced by Find_m_faces().

◆ TestRank()

◆ traite_m_face()

◆ VertexCT()

Matrix * VertexCT ( Matrix V,
Matrix CT 
)

Variable Documentation

◆ CEqualities

Polyhedron* CEqualities
static

Definition at line 280 of file polyparam.c.

Referenced by Add_CEqualities(), Find_m_faces(), and Polyhedron2Param_Domain().

◆ cntbit

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 509 of file polyparam.c.

Referenced by count_sat().

◆ CTest

Matrix* CTest
static

Definition at line 285 of file polyparam.c.

Referenced by Find_m_faces(), and scan_m_face().

◆ egalite

unsigned int* egalite
static

Definition at line 282 of file polyparam.c.

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

◆ KD

int KD
static

Definition at line 290 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ m

◆ m_dim

int m_dim
static

Definition at line 275 of file polyparam.c.

Referenced by Find_m_faces(), and scan_m_face().

◆ n

◆ nbPV

int nbPV
static

Definition at line 293 of file polyparam.c.

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

◆ nr

int nr
static

◆ PDomains

Param_Domain* PDomains
static

Definition at line 295 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ Pi

Matrix * Pi
static

◆ PiInv

Matrix* PiInv
static

Definition at line 286 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ PiTest

Matrix* PiTest
static

Definition at line 284 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ PV_Result

Param_Vertices* PV_Result
static

Definition at line 294 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ RaysDi

Matrix* RaysDi
static

Definition at line 288 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().

◆ Sat

◆ ws

int ws
static

◆ Xi

Matrix* Xi
static

Definition at line 283 of file polyparam.c.

Referenced by Find_m_faces(), and traite_m_face().