1 #include "reduce_domain.h"
3 Polyhedron
*reduce_domain(Polyhedron
*D
, Matrix
*CT
, Polyhedron
*CEq
,
4 Polyhedron
**fVD
, int nd
, unsigned MaxRays
)
11 C
= D
->next
? DomainConvex(D
, MaxRays
) : D
;
12 Dt
= CT
? DomainPreimage(C
, CT
, MaxRays
) : C
;
13 rVD
= CEq
? DomainIntersection(Dt
, CEq
, MaxRays
) : Domain_Copy(Dt
);
15 /* if rVD is empty or too small in geometric dimension */
16 if(!rVD
|| emptyQ(rVD
) ||
17 (CEq
&& rVD
->Dimension
-rVD
->NbEq
< Dt
->Dimension
-Dt
->NbEq
-CEq
->NbEq
)) {
24 return 0; /* empty validity domain */
32 fVD
[nd
] = Domain_Copy(rVD
);
33 for (i
= 0 ; i
< nd
; ++i
) {
35 Polyhedron
*I
= DomainIntersection(fVD
[nd
], fVD
[i
], MaxRays
);
40 F
= DomainSimplify(I
, fVD
[nd
], MaxRays
);
43 rVD
= DomainDifference(rVD
, F
, MaxRays
);
50 rVD
= DomainConstraintSimplify(rVD
, MaxRays
);
58 barvinok_count(rVD
, &c
, MaxRays
);
59 if (value_zero_p(c
)) {