My Project
Functions
hilb.h File Reference
#include "polys/monomials/ring.h"
#include "kernel/polys.h"
#include "misc/intvec.h"

Go to the source code of this file.

Functions

intvechHstdSeries (ideal S, intvec *modulweight, intvec *wdegree, ideal Q=NULL, ring tailRing=currRing)
 
intvechFirstSeries (ideal S, intvec *modulweight, ideal Q=NULL, intvec *wdegree=NULL, ring tailRing=currRing)
 
intvechSecondSeries (intvec *hseries1)
 
void hLookSeries (ideal S, intvec *modulweight, ideal Q=NULL, intvec *wdegree=NULL, ring tailRing=currRing)
 
void sortMonoIdeal_pCompare (ideal I)
 

Function Documentation

◆ hFirstSeries()

intvec* hFirstSeries ( ideal  S,
intvec modulweight,
ideal  Q = NULL,
intvec wdegree = NULL,
ring  tailRing = currRing 
)

Definition at line 1335 of file hilb.cc.

1336 {
1337  id_TestTail(S, currRing, tailRing);
1338  if (Q!= NULL) id_TestTail(Q, currRing, tailRing);
1339 
1340  intvec *hseries1= hSeries(S, modulweight, 1, wdegree, Q, tailRing);
1341  if (errorreported) { delete hseries1; hseries1=NULL; }
1342  return hseries1;
1343 }
Definition: intvec.h:23
VAR short errorreported
Definition: feFopen.cc:23
static intvec * hSeries(ideal S, intvec *modulweight, int, intvec *wdegree, ideal Q, ring tailRing)
Definition: hilb.cc:1172
STATIC_VAR jList * Q
Definition: janet.cc:30
#define NULL
Definition: omList.c:12
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
#define id_TestTail(A, lR, tR)
Definition: simpleideals.h:77

◆ hHstdSeries()

intvec* hHstdSeries ( ideal  S,
intvec modulweight,
intvec wdegree,
ideal  Q = NULL,
ring  tailRing = currRing 
)

Definition at line 1328 of file hilb.cc.

1329 {
1330  id_TestTail(S, currRing, tailRing);
1331  if (Q!=NULL) id_TestTail(Q, currRing, tailRing);
1332  return hSeries(S, modulweight, 0, wdegree, Q, tailRing);
1333 }

◆ hLookSeries()

void hLookSeries ( ideal  S,
intvec modulweight,
ideal  Q = NULL,
intvec wdegree = NULL,
ring  tailRing = currRing 
)

Definition at line 1424 of file hilb.cc.

1425 {
1426  id_TestTail(S, currRing, tailRing);
1427 
1428  intvec *hseries1 = hFirstSeries(S, modulweight, Q, wdegree, tailRing);
1429  if (errorreported) return;
1430 
1431  hPrintHilb(hseries1,modulweight);
1432 
1433  const int l = hseries1->length()-1;
1434 
1435  intvec *hseries2 = (l > 1) ? hSecondSeries(hseries1) : hseries1;
1436 
1437  int co, mu;
1438  hDegreeSeries(hseries1, hseries2, &co, &mu);
1439 
1440  PrintLn();
1441  hPrintHilb(hseries2,modulweight);
1442  if ((l == 1) &&(mu == 0))
1443  scPrintDegree(rVar(currRing)+1, 0);
1444  else
1445  scPrintDegree(co, mu);
1446  if (l>1)
1447  delete hseries1;
1448  delete hseries2;
1449 }
int l
Definition: cfEzgcd.cc:100
void mu(int **points, int sizePoints)
int length() const
Definition: intvec.h:94
void scPrintDegree(int co, int mu)
Definition: hdegree.cc:881
static void hPrintHilb(intvec *hseries, intvec *modul_weight)
Definition: hilb.cc:1398
void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu)
Definition: hilb.cc:1380
intvec * hSecondSeries(intvec *hseries1)
Definition: hilb.cc:1345
intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
Definition: hilb.cc:1335
void PrintLn()
Definition: reporter.cc:310
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:594

◆ hSecondSeries()

intvec* hSecondSeries ( intvec hseries1)

Definition at line 1345 of file hilb.cc.

1346 {
1347  intvec *work, *hseries2;
1348  int i, j, k, t, l;
1349  int s;
1350  if (hseries1 == NULL)
1351  return NULL;
1352  work = new intvec(hseries1);
1353  k = l = work->length()-1;
1354  s = 0;
1355  for (i = k-1; i >= 0; i--)
1356  s += (*work)[i];
1357  loop
1358  {
1359  if ((s != 0) || (k == 1))
1360  break;
1361  s = 0;
1362  t = (*work)[k-1];
1363  k--;
1364  for (i = k-1; i >= 0; i--)
1365  {
1366  j = (*work)[i];
1367  (*work)[i] = -t;
1368  s += t;
1369  t += j;
1370  }
1371  }
1372  hseries2 = new intvec(k+1);
1373  for (i = k-1; i >= 0; i--)
1374  (*hseries2)[i] = (*work)[i];
1375  (*hseries2)[k] = (*work)[l];
1376  delete work;
1377  return hseries2;
1378 }
int i
Definition: cfEzgcd.cc:132
int k
Definition: cfEzgcd.cc:99
const CanonicalForm int s
Definition: facAbsFact.cc:51
int j
Definition: facHensel.cc:110
#define loop
Definition: structs.h:80

◆ sortMonoIdeal_pCompare()

void sortMonoIdeal_pCompare ( ideal  I)

Definition at line 1766 of file hilb.cc.

1767 {
1768  /*
1769  * sorts monomial ideal in ascending order
1770  * order must be a total degree
1771  */
1772 
1773  qsort(I->m, IDELEMS(I), sizeof(poly), monCompare);
1774 
1775 }
static int monCompare(const void *m, const void *n)
Definition: hilb.cc:1759
#define IDELEMS(i)
Definition: simpleideals.h:23