polylib 7.01
Zpolyhedron.h
Go to the documentation of this file.
1#ifndef _LBL_h_
2#define _LBL_h_
3
4#if defined(__cplusplus)
5extern "C" {
6#endif
7
8// DEFINITIONS:
9// - a 'single LBL' is a single affine integer function (as PolyLib matrix Lat)
10// associated to a polyhedral domain P (a union of polyhedra).
11// As such, it represents the set of all points:
12// {x = Lat z | z \in P and z \in Z^d}
13// In its canonical form, Lat is in homogeneous HNF and P does not contain
14// equalities (rational).
15//
16// - the name 'LBL' is used to describe a union of canonical LBLs, as a linked
17// list of single LBLs with possibly multiple _different_ lattices
18// ************************************************************
19// All user exposed functions manipulate canonical LBL unions
20// ************************************************************
21//
22// - a 'Z-polyhedron' is the intersection of an integer lattice and an
23// integer polyhedron. A Z-polyhedron *is* also a specific single LBL and
24// can be represented as such. The difference between an LBL and a
25// Z-polyhedron is that matrix Lat does not contain any column of zeros in
26// a Z-polyhedron (no dimension is eliminated by the Lat function).
27//
28// - a 'Z-domain' is a union of Z-polyhedra.
29//
30// All those objects are represented using the same data structure (LBL *),
31// but all the user-exposed functions handle LBL unions.
32
33// allocates the single LBL (Lat, Domain).
34extern LBL *LBLAlloc(Matrix *Lat, Polyhedron *Domain);
35
36// free memory
37extern void LBLFree(LBL *A);
38
39// print out, format depends on the Value type ("%d", "ld", etc.):
40extern void LBLPrint(FILE *fp, const char *format, LBL *A);
41
42// copy of A
43extern LBL *LBLCopy(LBL *A);
44
45// return the empty/universe LBL of given dimension:
46extern LBL *EmptyLBL(int dimension);
47extern LBL *UniverseLBL(int dimension);
48
49// check for emptiness (if the LBL is the result of a complex operation, it is
50// advised to call LBLSimplifyEmpty(A) before):
51extern Bool isEmptyLBL(LBL *A);
52
53// union A U B
54extern LBL *LBLUnion(LBL *A, LBL *B);
55
56// True if A \in B
57extern Bool LBLIncluded(LBL *A, LBL *B);
58
59// intersection A \cap B
60extern LBL *LBLIntersection(LBL *A, LBL *B);
61
62// difference A - B
63extern LBL *LBLDifference(LBL *A, LBL *B);
64
65// image by affine function
66extern LBL *LBLImage(LBL *A, Matrix *Func);
67
68// preimage by affine function
69extern LBL *LBLPreimage(LBL *A, Matrix *Func);
70
71// complement = Universe - A
72extern LBL *LBLComplement(LBL *A);
73
74// check for empty coordinate polyhedra and remove them (in place)
75extern void LBLSimplifyEmpty(LBL *A);
76
77// tries to simplify the union of polyhedra representing A (in place)
78extern void LBLSimplify(LBL *A);
79
80
81// All above functions always manipulate canonical LBLs.
82// The CanonicalLBL() function is only exposed to the user to enable
83// normalization of a self-built non-canonical union of LBLs (in place)
84extern void CanonicalLBL(LBL* A);
85
86// This function transforms a union of LBLs into a union of Z-domains:
87extern LBL *LBL2ZDomain(LBL *A);
88
89// This function transforms a union of LBLs into a disjoint union of LBLs:
90extern LBL *LBLDisjointUnion(LBL *A);
91
92// removed:
93// extern LBL *SplitLBL(LBL *ZPol, Matrix *B);
94// extern LBL *IntegraliseMatrix(LBL *A);
95
96#if defined(__cplusplus)
97}
98#endif
99
100#endif /* _LBL_h_ */
void LBLSimplifyEmpty(LBL *A)
Definition: Zpolyhedron.c:3235
void CanonicalLBL(LBL *A)
Definition: Zpolyhedron.c:3117
LBL * LBLCopy(LBL *A)
Definition: Zpolyhedron.c:144
LBL * LBLImage(LBL *A, Matrix *Func)
Definition: Zpolyhedron.c:475
LBL * LBLPreimage(LBL *A, Matrix *Func)
Definition: Zpolyhedron.c:497
LBL * LBL2ZDomain(LBL *A)
Definition: Zpolyhedron.c:3213
void LBLSimplify(LBL *A)
Definition: Zpolyhedron.c:3281
LBL * LBLUnion(LBL *A, LBL *B)
Definition: Zpolyhedron.c:344
LBL * LBLDisjointUnion(LBL *A)
Definition: Zpolyhedron.c:3480
LBL * LBLComplement(LBL *A)
Definition: Zpolyhedron.c:922
void LBLFree(LBL *A)
Definition: Zpolyhedron.c:122
LBL * UniverseLBL(int dimension)
Definition: Zpolyhedron.c:218
void LBLPrint(FILE *fp, const char *format, LBL *A)
Definition: Zpolyhedron.c:324
LBL * LBLDifference(LBL *A, LBL *B)
Definition: Zpolyhedron.c:406
Bool isEmptyLBL(LBL *A)
Definition: Zpolyhedron.c:54
Bool LBLIncluded(LBL *A, LBL *B)
Definition: Zpolyhedron.c:272
LBL * EmptyLBL(int dimension)
Definition: Zpolyhedron.c:189
LBL * LBLIntersection(LBL *A, LBL *B)
Definition: Zpolyhedron.c:364
LBL * LBLAlloc(Matrix *Lat, Polyhedron *Domain)
Definition: Zpolyhedron.c:75
Definition: types.h:245
Definition: types.h:88
Bool
Definition: types.h:45