375{
376 ring r = currentStrategy.getStartingRing();
377 ideal I = currentStrategy.getStartingIdeal();
378 currentStrategy.reduce(I,r);
379 if (currentStrategy.isValuationTrivial())
380 {
381
382
383
386 nMapFunc identityMap = n_SetMap(r->cf,
s->cf);
387 for (
int i=0;
i<
k;
i++)
388 {
390 {
392 }
393 }
394
395
396
397
398
401 if (zc.dimension()>=currentStrategy.getExpectedDimension())
402 {
403
404
406 if (mon)
407 {
409 p_Delete(&mon,r);
411 return emptyCone;
412 }
415 return startingCone;
416 }
417 while (zc.dimension()<currentStrategy.getExpectedDimension())
418 {
419
421 gfan::ZVector startingPoint = startingData.first;
424
428
429
432 }
433
434
435
436
437
438
440 nMapFunc identity = n_SetMap(
s->cf,s0->cf);
443 for (
int i=0;
i<
k;
i++)
445
446 identity = n_SetMap(r->cf,s0->cf);
449 for (
int i=0;
i<
k;
i++)
451
452
453
454
455
463
464
465 return startingCone;
466 }
467 else
468 {
469
470
471
474 nMapFunc identityMap = n_SetMap(r->cf,
s->cf);
475 for (
int i=0;
i<
k;
i++)
476 {
478 {
480 }
481 }
482
483
484
486 if (zc.dimension()>=currentStrategy.getExpectedDimension())
487 {
488
490 if (mon)
491 {
493 p_Delete(&mon,r);
494 return emptyCone;
495 }
499 return startingCone;
500 }
501
502
503
505 gfan::ZVector startingPoint = startingData.first;
512 ideal inI =
initial(I,r,startingPoint);
514
515
516
517 if (zc.dimension()==currentStrategy.getExpectedDimension())
518 {
519
520 ideal J =
lift(I,r,inJ,
s);
524 return startingCone;
525 }
526
527
528
529
530 ring rShortcut =
rCopy0(r);
532 rShortcut->cf = nCopyCoeff((currentStrategy.getShortcutRing())->cf);
537 nMapFunc takingResidues = n_SetMap(
s->cf,rShortcut->cf);
538 for (
int i=0;
i<
k;
i++)
539 {
541 {
543 }
544 }
547
548
549
550
551
555
556
557
558
563 inJShortcut =
initial(inJShortcut,sShortcut,interiorPoint);
564 inI =
initial(inI,r,interiorPoint);
565
568 s->cf = nCopyCoeff(r->cf);
571
575 identityMap = n_SetMap(r->cf,
s->cf);
576 p_SetCoeff(inJ->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,
s->cf),
s);
577 nMapFunc findingRepresentatives = n_SetMap(sShortcut->cf,
s->cf);
578 for (
int i=0;
i<
k;
i++)
579 {
580 if(inJShortcut->m[
i]!=
NULL)
581 {
583 }
584 }
585
587 nMapFunc identity = n_SetMap(
s->cf,s0->cf);
590 for (
int i=0;
i<
k;
i++)
592
593 identity = n_SetMap(r->cf,s0->cf);
596 for (
int i=0;
i<
k;
i++)
600
601
602
603
605
608
609
610 return startingCone;
611 }
612}
gfan::ZCone getPolyhedralCone() const
ideal getPolynomialIdeal() const
ring getPolynomialRing() const
gfan::ZVector getInteriorPoint() const
number(*) nMapFunc(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void nKillChar(coeffs r)
undo all initialisations
poly checkForMonomialViaSuddenSaturation(const ideal I, const ring r)
const CanonicalForm int s
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
ideal lift(const ideal J, const ring r, const ideal inI, const ring s)
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
void rDelete(ring r)
unconditionally deletes fields in r
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
gfan::ZMatrix tropicalStartingPoints
static gfan::ZCone linealitySpaceOfGroebnerFan(const ideal I, const ring r)
ring createTraversalStartingRing(const ring s, const gfan::ZMatrix &startingPoints, const tropicalStrategy ¤tStrategy)
groebnerCone tropicalStartingCone(const tropicalStrategy ¤tStrategy)
std::pair< gfan::ZVector, groebnerCone > tropicalStartingDataViaGroebnerFan(const ideal I, const ring r, const tropicalStrategy ¤tStrategy)
Computes a starting point outside the lineatliy space by traversing the Groebner fan,...
ideal gfanlib_kStd_wrapper(ideal I, ring r, tHomog h=testHomog)
bool areIdealsEqual(ideal I, ring r, ideal J, ring s)