My Project  debian-1:4.1.2-p1+ds-2
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:78

◆ 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 1418 of file hilb.cc.

1419 {
1420  id_TestTail(S, currRing, tailRing);
1421 
1422  intvec *hseries1 = hFirstSeries(S, modulweight, Q, wdegree, tailRing);
1423  if (errorreported) return;
1424 
1425  hPrintHilb(hseries1);
1426 
1427  const int l = hseries1->length()-1;
1428 
1429  intvec *hseries2 = (l > 1) ? hSecondSeries(hseries1) : hseries1;
1430 
1431  int co, mu;
1432  hDegreeSeries(hseries1, hseries2, &co, &mu);
1433 
1434  PrintLn();
1435  hPrintHilb(hseries2);
1436  if ((l == 1) &&(mu == 0))
1437  scPrintDegree(rVar(currRing)+1, 0);
1438  else
1439  scPrintDegree(co, mu);
1440  if (l>1)
1441  delete hseries1;
1442  delete hseries2;
1443 }
int l
Definition: cfEzgcd.cc:93
void mu(int **points, int sizePoints)
int length() const
Definition: intvec.h:94
void scPrintDegree(int co, int mu)
Definition: hdegree.cc:807
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
static void hPrintHilb(intvec *hseries)
Definition: hilb.cc:1398
void PrintLn()
Definition: reporter.cc:310
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:587

◆ 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:125
int k
Definition: cfEzgcd.cc:92
const CanonicalForm int s
Definition: facAbsFact.cc:55
int j
Definition: facHensel.cc:105
#define loop
Definition: structs.h:80

◆ sortMonoIdeal_pCompare()

void sortMonoIdeal_pCompare ( ideal  I)

Definition at line 1760 of file hilb.cc.

1761 {
1762  /*
1763  * sorts monomial ideal in ascending order
1764  * order must be a total degree
1765  */
1766 
1767  qsort(I->m, IDELEMS(I), sizeof(poly), monCompare);
1768 
1769 }
static int monCompare(const void *m, const void *n)
Definition: hilb.cc:1753
#define IDELEMS(i)
Definition: simpleideals.h:23