Data Structures | Typedefs | Functions
groebnerCone.h File Reference

implementation of the class groebnerCone More...

#include <kernel/polys.h>
#include <Singular/ipid.h>
#include <polys/monomials/ring.h>
#include <polys/simpleideals.h>
#include <kernel/ideals.h>
#include <gfanlib/gfanlib.h>
#include <set>
#include <tropicalStrategy.h>

Go to the source code of this file.

Data Structures

class  groebnerCone
 
struct  groebnerCone_compare
 

Typedefs

typedef std::set< groebnerCone, groebnerCone_comparegroebnerCones
 

Functions

gfan::ZFan * toFanStar (groebnerCones setOfCones)
 
BOOLEAN flipConeDebug (leftv res, leftv args)
 
BOOLEAN groebnerNeighboursDebug (leftv res, leftv args)
 
BOOLEAN tropicalNeighboursDebug (leftv res, leftv args)
 

Detailed Description

implementation of the class groebnerCone

groebnerCone is a class that encapsulates relevant (possibly redundant) information about a groebnerCone. Moreover, it contains implrementation of several highly non-trivial algorithms, such as computing its neighbours in the Groebner fan or computing its neighbours in the tropical variety.

Definition in file groebnerCone.h.

Typedef Documentation

§ groebnerCones

Definition at line 24 of file groebnerCone.h.

Function Documentation

§ flipConeDebug()

BOOLEAN flipConeDebug ( leftv  res,
leftv  args 
)

Definition at line 526 of file groebnerCone.cc.

527 {
528  leftv u = args;
529  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
530  {
531  leftv v = u->next;
532  if ((v!=NULL) && (v->Typ()==NUMBER_CMD))
533  {
534  leftv w = v->next;
535  if ((w!=NULL) && (w->Typ()==BIGINTMAT_CMD))
536  {
537  leftv x = w->next;
538  if ((x!=NULL) && (x->Typ()==BIGINTMAT_CMD))
539  {
540  omUpdateInfo();
541  Print("usedBytesBefore=%ld\n",om_Info.UsedBytes);
542 
543  ideal I = (ideal) u->CopyD();
544  number p = (number) v->CopyD();
545  bigintmat* interiorPoint0 = (bigintmat*) w->CopyD();
546  bigintmat* facetNormal0 = (bigintmat*) x->CopyD();
548 
549  gfan::ZVector* interiorPoint = bigintmatToZVector(interiorPoint0);
550  gfan::ZVector* facetNormal = bigintmatToZVector(facetNormal0);
551 
552  groebnerCone sigma(I,currRing,debug);
553  groebnerCone theta = sigma.flipCone(*interiorPoint,*facetNormal);
554 
555  id_Delete(&I,currRing);
556  n_Delete(&p,currRing->cf);
557  delete interiorPoint0;
558  delete facetNormal0;
559  delete interiorPoint;
560  delete facetNormal;
561 
562  res->rtyp = NONE;
563  res->data = NULL;
564  return FALSE;
565  }
566  }
567  }
568  }
569  WerrorS("computeFlipDebug: unexpected parameters");
570  return TRUE;
571 }
Class used for (list of) interpreter objects.
Definition: subexpr.h:84
#define Print
Definition: emacs.cc:83
#define FALSE
Definition: auxiliary.h:97
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:51
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
#define TRUE
Definition: auxiliary.h:101
void WerrorS(const char *s)
Definition: feFopen.cc:24
static tropicalStrategy debugStrategy(const ideal startIdeal, number unifParameter, ring startRing)
int Typ()
Definition: subexpr.cc:979
void * data
Definition: subexpr.h:90
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
omInfo_t om_Info
Definition: omStats.c:13
leftv next
Definition: subexpr.h:88
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define NULL
Definition: omList.c:10
void omUpdateInfo()
Definition: omStats.c:24
const CanonicalForm & w
Definition: facAbsFact.cc:55
int rtyp
Definition: subexpr.h:93
Variable x
Definition: cfModGcd.cc:4023
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459
#define NONE
Definition: tok.h:216
groebnerCone flipCone(const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const
Given an interior point on the facet and the outer normal factor on the facet, returns the adjacent g...
void * CopyD(int t)
Definition: subexpr.cc:679
gfan::ZVector * bigintmatToZVector(const bigintmat &bim)

§ groebnerNeighboursDebug()

BOOLEAN groebnerNeighboursDebug ( leftv  res,
leftv  args 
)

Definition at line 573 of file groebnerCone.cc.

574 {
575  leftv u = args;
576  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
577  {
578  leftv v = u->next;
579  if ((v!=NULL) && (v->Typ()==NUMBER_CMD))
580  {
581  omUpdateInfo();
582  Print("usedBytesBefore=%ld\n",om_Info.UsedBytes);
583 
584  ideal I = (ideal) u->CopyD();
585  number p = (number) v->CopyD();
586 
588  groebnerCone sigma(I,currRing,debug);
589  groebnerCones neighbours = sigma.groebnerNeighbours();
590 
591  id_Delete(&I,currRing);
592  n_Delete(&p,currRing->cf);
593  res->rtyp = NONE;
594  res->data = NULL;
595  return FALSE;
596  }
597  }
598  WerrorS("computeFlipDebug: unexpected parameters");
599  return TRUE;
600 }
Class used for (list of) interpreter objects.
Definition: subexpr.h:84
#define Print
Definition: emacs.cc:83
#define FALSE
Definition: auxiliary.h:97
return P p
Definition: myNF.cc:203
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
#define TRUE
Definition: auxiliary.h:101
void WerrorS(const char *s)
Definition: feFopen.cc:24
static tropicalStrategy debugStrategy(const ideal startIdeal, number unifParameter, ring startRing)
int Typ()
Definition: subexpr.cc:979
std::set< groebnerCone, groebnerCone_compare > groebnerCones
Definition: groebnerCone.h:24
void * data
Definition: subexpr.h:90
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
omInfo_t om_Info
Definition: omStats.c:13
leftv next
Definition: subexpr.h:88
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define NULL
Definition: omList.c:10
void omUpdateInfo()
Definition: omStats.c:24
int rtyp
Definition: subexpr.h:93
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459
#define NONE
Definition: tok.h:216
void * CopyD(int t)
Definition: subexpr.cc:679

§ toFanStar()

gfan::ZFan* toFanStar ( groebnerCones  setOfCones)

Definition at line 505 of file groebnerCone.cc.

506 {
507  if (setOfCones.size() > 0)
508  {
509  groebnerCones::iterator sigma = setOfCones.begin();
510  gfan::ZFan* zf = new gfan::ZFan(sigma->getPolyhedralCone().ambientDimension());
511  for (; sigma!=setOfCones.end(); sigma++)
512  {
513  gfan::ZCone zc = sigma->getPolyhedralCone();
514  // assume(isCompatible(zf,&zc));
515  zf->insert(zc);
516  }
517  return zf;
518  }
519  else
520  return new gfan::ZFan(gfan::ZFan(currRing->N));
521 }
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10

§ tropicalNeighboursDebug()

BOOLEAN tropicalNeighboursDebug ( leftv  res,
leftv  args 
)

Definition at line 602 of file groebnerCone.cc.

603 {
604  leftv u = args;
605  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
606  {
607  leftv v = u->next;
608  if ((v!=NULL) && (v->Typ()==NUMBER_CMD))
609  {
610  omUpdateInfo();
611  Print("usedBytesBefore=%ld\n",om_Info.UsedBytes);
612 
613  ideal I = (ideal) u->CopyD();
614  number p = (number) v->CopyD();
615 
617  groebnerCone sigma(I,currRing,debug);
618  groebnerCones neighbours = sigma.groebnerNeighbours();
619 
620  id_Delete(&I,currRing);
621  n_Delete(&p,currRing->cf);
622  res->rtyp = NONE;
623  res->data = NULL;
624  return FALSE;
625  }
626  }
627  WerrorS("computeFlipDebug: unexpected parameters");
628  return TRUE;
629 }
Class used for (list of) interpreter objects.
Definition: subexpr.h:84
#define Print
Definition: emacs.cc:83
#define FALSE
Definition: auxiliary.h:97
return P p
Definition: myNF.cc:203
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
#define TRUE
Definition: auxiliary.h:101
void WerrorS(const char *s)
Definition: feFopen.cc:24
static tropicalStrategy debugStrategy(const ideal startIdeal, number unifParameter, ring startRing)
int Typ()
Definition: subexpr.cc:979
std::set< groebnerCone, groebnerCone_compare > groebnerCones
Definition: groebnerCone.h:24
void * data
Definition: subexpr.h:90
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
omInfo_t om_Info
Definition: omStats.c:13
leftv next
Definition: subexpr.h:88
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define NULL
Definition: omList.c:10
void omUpdateInfo()
Definition: omStats.c:24
int rtyp
Definition: subexpr.h:93
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:459
#define NONE
Definition: tok.h:216
void * CopyD(int t)
Definition: subexpr.cc:679