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

1374 {
1375  id_TestTail(S, currRing, tailRing);
1376  if (Q!= NULL) id_TestTail(Q, currRing, tailRing);
1377 
1378  intvec *hseries1= hSeries(S, modulweight, 1, wdegree, Q, tailRing);
1379  if (errorreported) { delete hseries1; hseries1=NULL; }
1380  return hseries1;
1381 }
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:1210
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 1366 of file hilb.cc.

1367 {
1368  id_TestTail(S, currRing, tailRing);
1369  if (Q!=NULL) id_TestTail(Q, currRing, tailRing);
1370  return hSeries(S, modulweight, 0, wdegree, Q, tailRing);
1371 }

◆ hLookSeries()

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

Definition at line 1462 of file hilb.cc.

1463 {
1464  id_TestTail(S, currRing, tailRing);
1465 
1466  intvec *hseries1 = hFirstSeries(S, modulweight, Q, wdegree, tailRing);
1467  if (errorreported) return;
1468 
1469  hPrintHilb(hseries1,modulweight);
1470 
1471  const int l = hseries1->length()-1;
1472 
1473  intvec *hseries2 = (l > 1) ? hSecondSeries(hseries1) : hseries1;
1474 
1475  int co, mu;
1476  hDegreeSeries(hseries1, hseries2, &co, &mu);
1477 
1478  PrintLn();
1479  hPrintHilb(hseries2,modulweight);
1480  if ((l == 1) &&(mu == 0))
1481  scPrintDegree(rVar(currRing)+1, 0);
1482  else
1483  scPrintDegree(co, mu);
1484  if (l>1)
1485  delete hseries1;
1486  delete hseries2;
1487 }
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:1436
void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu)
Definition: hilb.cc:1418
intvec * hSecondSeries(intvec *hseries1)
Definition: hilb.cc:1383
intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
Definition: hilb.cc:1373
void PrintLn()
Definition: reporter.cc:310
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:593

◆ hSecondSeries()

intvec* hSecondSeries ( intvec hseries1)

Definition at line 1383 of file hilb.cc.

1384 {
1385  intvec *work, *hseries2;
1386  int i, j, k, t, l;
1387  int s;
1388  if (hseries1 == NULL)
1389  return NULL;
1390  work = new intvec(hseries1);
1391  k = l = work->length()-1;
1392  s = 0;
1393  for (i = k-1; i >= 0; i--)
1394  s += (*work)[i];
1395  loop
1396  {
1397  if ((s != 0) || (k == 1))
1398  break;
1399  s = 0;
1400  t = (*work)[k-1];
1401  k--;
1402  for (i = k-1; i >= 0; i--)
1403  {
1404  j = (*work)[i];
1405  (*work)[i] = -t;
1406  s += t;
1407  t += j;
1408  }
1409  }
1410  hseries2 = new intvec(k+1);
1411  for (i = k-1; i >= 0; i--)
1412  (*hseries2)[i] = (*work)[i];
1413  (*hseries2)[k] = (*work)[l];
1414  delete work;
1415  return hseries2;
1416 }
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:79

◆ sortMonoIdeal_pCompare()

void sortMonoIdeal_pCompare ( ideal  I)

Definition at line 1804 of file hilb.cc.

1805 {
1806  /*
1807  * sorts monomial ideal in ascending order
1808  * order must be a total degree
1809  */
1810 
1811  qsort(I->m, IDELEMS(I), sizeof(poly), monCompare);
1812 
1813 }
static int monCompare(const void *m, const void *n)
Definition: hilb.cc:1797
#define IDELEMS(i)
Definition: simpleideals.h:23