My Project  UNKNOWN_GIT_VERSION
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 1336 of file hilb.cc.

1337 {
1338  id_TestTail(S, currRing, tailRing);
1339  if (Q!= NULL) id_TestTail(Q, currRing, tailRing);
1340 
1341  intvec *hseries1= hSeries(S, modulweight, 1, wdegree, Q, tailRing);
1342  if (errorreported) { delete hseries1; hseries1=NULL; }
1343  return hseries1;
1344 }

◆ hHstdSeries()

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

Definition at line 1329 of file hilb.cc.

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

◆ hLookSeries()

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

Definition at line 1419 of file hilb.cc.

1420 {
1421  id_TestTail(S, currRing, tailRing);
1422 
1423  intvec *hseries1 = hFirstSeries(S, modulweight, Q, wdegree, tailRing);
1424  if (errorreported) return;
1425 
1426  hPrintHilb(hseries1);
1427 
1428  const int l = hseries1->length()-1;
1429 
1430  intvec *hseries2 = (l > 1) ? hSecondSeries(hseries1) : hseries1;
1431 
1432  int co, mu;
1433  hDegreeSeries(hseries1, hseries2, &co, &mu);
1434 
1435  PrintLn();
1436  hPrintHilb(hseries2);
1437  if ((l == 1) &&(mu == 0))
1438  scPrintDegree(rVar(currRing)+1, 0);
1439  else
1440  scPrintDegree(co, mu);
1441  if (l>1)
1442  delete hseries1;
1443  delete hseries2;
1444 }

◆ hSecondSeries()

intvec* hSecondSeries ( intvec hseries1)

Definition at line 1346 of file hilb.cc.

1347 {
1348  intvec *work, *hseries2;
1349  int i, j, k, t, l;
1350  int s;
1351  if (hseries1 == NULL)
1352  return NULL;
1353  work = new intvec(hseries1);
1354  k = l = work->length()-1;
1355  s = 0;
1356  for (i = k-1; i >= 0; i--)
1357  s += (*work)[i];
1358  loop
1359  {
1360  if ((s != 0) || (k == 1))
1361  break;
1362  s = 0;
1363  t = (*work)[k-1];
1364  k--;
1365  for (i = k-1; i >= 0; i--)
1366  {
1367  j = (*work)[i];
1368  (*work)[i] = -t;
1369  s += t;
1370  t += j;
1371  }
1372  }
1373  hseries2 = new intvec(k+1);
1374  for (i = k-1; i >= 0; i--)
1375  (*hseries2)[i] = (*work)[i];
1376  (*hseries2)[k] = (*work)[l];
1377  delete work;
1378  return hseries2;
1379 }

◆ sortMonoIdeal_pCompare()

void sortMonoIdeal_pCompare ( ideal  I)

Definition at line 1761 of file hilb.cc.

1762 {
1763  /*
1764  * sorts monomial ideal in ascending order
1765  * order must be a total degree
1766  */
1767 
1768  qsort(I->m, IDELEMS(I), sizeof(poly), monCompare);
1769 
1770 }
hPrintHilb
static void hPrintHilb(intvec *hseries)
Definition: hilb.cc:1399
monCompare
static int monCompare(const void *m, const void *n)
Definition: hilb.cc:1754
j
int j
Definition: facHensel.cc:105
errorreported
short errorreported
Definition: feFopen.cc:23
k
int k
Definition: cfEzgcd.cc:92
loop
#define loop
Definition: structs.h:78
mu
void mu(int **points, int sizePoints)
Definition: cfNewtonPolygon.cc:467
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:582
i
int i
Definition: cfEzgcd.cc:125
hSeries
static intvec * hSeries(ideal S, intvec *modulweight, int, intvec *wdegree, ideal Q, ring tailRing)
Definition: hilb.cc:1173
intvec
Definition: intvec.h:17
hSecondSeries
intvec * hSecondSeries(intvec *hseries1)
Definition: hilb.cc:1346
hFirstSeries
intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
Definition: hilb.cc:1336
id_TestTail
#define id_TestTail(A, lR, tR)
Definition: simpleideals.h:79
NULL
#define NULL
Definition: omList.c:10
l
int l
Definition: cfEzgcd.cc:93
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
hDegreeSeries
void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu)
Definition: hilb.cc:1381
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:26
Q
#define Q
Definition: sirandom.c:25
PrintLn
void PrintLn()
Definition: reporter.cc:310
intvec::length
int length() const
Definition: intvec.h:94
scPrintDegree
void scPrintDegree(int co, int mu)
Definition: hdegree.cc:808