Go to the source code of this file.
|
void | gitfan::mergeFacets (facets &F, const facets &newFacets) |
|
static gfan::ZCone | subcone (const lists &cones, const gfan::ZVector &point) |
|
static gitfan::facets | interiorFacets (const gfan::ZCone &zc, const gfan::ZCone &bound) |
|
BOOLEAN | refineCones (leftv res, leftv args) |
|
static int | binomial (int n, int k) |
|
intvec * | intToAface (unsigned int v0, int n, int k) |
|
BOOLEAN | listOfAfacesToCheck (leftv res, leftv args) |
|
BOOLEAN | nextAfaceToCheck (leftv res, leftv args) |
|
BOOLEAN | checkSigns (leftv res, leftv args) |
|
BOOLEAN | binaryToBigint (leftv res, leftv args) |
|
BOOLEAN | composeIntvecs (leftv res, leftv args) |
|
BOOLEAN | findPlaceToInsert (leftv res, leftv args) |
|
int SI_MOD_INIT() | gitfan (SModulFunctions *p) |
|
◆ binaryToBigint()
Definition at line 417 of file gitfan.cc.
418{
421 {
427 for (
int i=1;
i<
l;
i++)
428 {
437 }
442 }
443 WerrorS(
"binaryToBigint: unexpected parameter");
445}
Class used for (list of) interpreter objects.
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
void WerrorS(const char *s)
◆ binomial()
Definition at line 262 of file gitfan.cc.
263{
265 return(0);
268 for (
int i=1;
i<=
k;
i++)
270 for (
int j=n-
k+1;
j<=n;
j++)
273 return(bin.toInt());
274}
◆ checkSigns()
Definition at line 368 of file gitfan.cc.
369{
372 {
375 {
378 {
381 }
382 else
387 {
389 {
390 res->data = (
void*) (
long) 0;
392 }
394 {
398 {
400 res->data = (
void*) (
long) 0;
402 }
404 }
405 }
406 res->data = (
void*) (
long) 1;
408 delete interiorPoint;
410 }
411 }
412 WerrorS(
"checkSigns: unexpected parameter");
414}
bigintmat * iv2bim(intvec *b, const coeffs C)
coeffs basecoeffs() const
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
const Variable & v
< [in] a sqrfree bivariate poly
◆ composeIntvecs()
Definition at line 448 of file gitfan.cc.
449{
452 {
455 {
460 for (
int i=0;
i<
k;
i++)
465 }
466 }
467 WerrorS(
"composeIntvecs: unexpected parameter");
469}
◆ findPlaceToInsert()
Definition at line 472 of file gitfan.cc.
473{
476 {
479 {
485 {
489 }
490
493 {
495 res->data = (
void*) (
long) (-1);
497 }
499 {
503 }
504
507 {
509 res->data = (
void*) (
long) (-1);
511 }
513 {
517 }
518
520 {
528 {
530 res->data = (
void*) (
long) -1;
532 }
537 }
538
542 }
543 }
544 WerrorS(
"findPlaceToInsert: unexpected parameter");
546}
static FORCE_INLINE BOOLEAN n_Greater(number a, number b, const coeffs r)
ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the l...
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
◆ gitfan()
Definition at line 549 of file gitfan.cc.
550{
560}
BOOLEAN listOfAfacesToCheck(leftv res, leftv args)
BOOLEAN findPlaceToInsert(leftv res, leftv args)
BOOLEAN checkSigns(leftv res, leftv args)
BOOLEAN refineCones(leftv res, leftv args)
BOOLEAN binaryToBigint(leftv res, leftv args)
BOOLEAN nextAfaceToCheck(leftv res, leftv args)
BOOLEAN composeIntvecs(leftv res, leftv args)
◆ interiorFacets()
Definition at line 104 of file gitfan.cc.
105{
111 if (r*c == 0)
112
113
114
115
116 return F;
117
118
119
120
125 eta.canonicalize();
128
129 if (
bound.containsRelatively(
v))
131
132
133 for (
int i=1;
i<r-1;
i++)
134 {
140 eta.canonicalize();
141 v = eta.getRelativeInteriorPoint();
143 if (
bound.containsRelatively(
v))
145 }
146
147
152 eta.canonicalize();
153
154 v = eta.getRelativeInteriorPoint();
156 if (
bound.containsRelatively(
v))
158
159 return F;
160}
BOOLEAN equations(leftv res, leftv args)
BOOLEAN inequalities(leftv res, leftv args)
static CanonicalForm bound(const CFMatrix &M)
std::set< facet, facet_compare > facets
◆ intToAface()
Definition at line 277 of file gitfan.cc.
278{
281 for (
int i=0;
i<n;
i++)
282 {
285 }
287}
◆ listOfAfacesToCheck()
Definition at line 290 of file gitfan.cc.
291{
294 {
297 {
299 int k = (
int)(
long)
v->Data();
301 for (
int i=0;
i<
k;
i++)
303
306 unsigned int t;
307 while (!(
v & (1<<n)))
308 {
311
312
314
315
317 }
319 res->data = (
void*) L;
321 }
322 }
323 WerrorS(
"listOfAfacesToCheck: unexpected parameter");
325}
INLINE_THIS void Init(int l=0)
static int binomial(int n, int k)
intvec * intToAface(unsigned int v0, int n, int k)
int status int void size_t count
◆ nextAfaceToCheck()
Definition at line 328 of file gitfan.cc.
329{
332 {
335 {
338 {
342
346
347 unsigned int t =
af | (
af - 1);
349
351 {
355 }
356
360 }
361 }
362 }
363 WerrorS(
"nextAfaceToCheck: unexpected parameter");
365}
BOOLEAN ambientDimension(leftv res, leftv args)
BOOLEAN dimension(leftv res, leftv args)
◆ refineCones()
Definition at line 162 of file gitfan.cc.
163{
166 {
169 {
175
176
177
178
179
180
181
182
183
185 do
186 {
189 }
193
198 if (F.empty())
199 {
203 }
205
211 while (!F.empty())
212 {
213
214
215
218 interiorPoint =
f.getInteriorPoint();
219 facetNormal =
f.getFacetNormal();
220
221
222
223
224
225
226 point =
mu * interiorPoint - facetNormal;
227 while (!
support.containsRelatively(point))
228 {
230 point =
mu * interiorPoint - facetNormal;
231 }
232
234 while ((
lambda.dimension() <
lambda.ambientDimension()) && !(
lambda.contains(interiorPoint)))
235 {
237 point =
mu * interiorPoint - facetNormal;
239 }
241
242
243
244
245
251 }
255 }
256 }
257 WerrorS(
"refineCones: unexpected parameters");
259}
gfan::ZVector randomPoint(const gfan::ZCone *zc, const int b)
gfan::ZMatrix * bigintmatToZMatrix(const bigintmat &bim)
void lambda(int **points, int sizePoints)
static BOOLEAN support(leftv res, leftv args)
static gitfan::facets interiorFacets(const gfan::ZCone &zc, const gfan::ZCone &bound)
static gfan::ZCone subcone(const lists &cones, const gfan::ZVector &point)
static matrix mu(matrix A, const ring R)
void mergeFacets(facets &F, const facets &newFacets)
◆ subcone()
Definition at line 91 of file gitfan.cc.
92{
96 {
98 if (
zc->contains(point))
100 }
102}