17#include "factoryconf.h"
23#include "kernel/subexpr.h"
27#include "kernel/ipid.h"
28#include "kernel/ipshell.h"
41#define PROT(msg) if (BTEST1(OPT_PROT)) Print(msg)
42#define STICKYPROT(msg) if (BTEST1(OPT_PROT)) Print(msg)
43#define PROT2(msg,arg) if (BTEST1(OPT_PROT)) Print(msg,arg)
44#define STICKYPROT2(msg,arg) if (BTEST1(OPT_PROT)) Print(msg,arg)
45#define fglmASSERT(ignore1,ignore2)
70#ifndef HAVE_EXPLICIT_CONSTR
117 numelems= (*newhilb)[deg]-(*source)[deg];
162 basis= ++(
dat->basisSize);
164 ++
dat->numberofdestbasismonoms;
165 if (
dat->numMonoms ==
dat->monlistmax ) {
167#ifdef HAVE_EXPLICIT_CONSTR
173 for (
k=
dat->monlistmax;
k < (
dat->monlistmax+
dat->monlistblock);
k++ )
174 dat->monlist[
k].homogElem();
180 for (
k=
dat->monlistmax - 1;
k >= 0;
k-- )
185 dat->monlistmax+=
dat->monlistblock;
187#ifdef HAVE_EXPLICIT_CONSTR
190 dat->monlist[
dat->numMonoms].initialize( mon, basis,
inDest );
205 generateMonoms(
newm, var+1, deg,
dat );
223 for (
s=
dat.numMonoms - 1;
s >= 0;
s-- ) {
236 for (
s= 0;
s <
dat.numMonoms;
s++ ) {
239 if (
dat.monlist[
s].basis == 0 ) {
248 for ( t=
dat.numMonoms - 1; t >= 0; t-- ) {
249 if (
dat.monlist[t].basis > 0 ) {
252 v.setelem(
dat.monlist[t].basis, coeff );
275 for (
s=
dat.numMonoms - 1;
s >= 0;
s-- ) {
279 for (
k=
dat.basisSize;
k > 0;
k-- ){
299 if ( gauss.reduce(
dat.monlist[
s].dv ) ==
FALSE ) {
311 for (
k= 1;
k <
p.size();
k++ ) {
312 if ( !
p.elemIsZero(
k ) ) {
313 while (
dat.monlist[
l].destbasis !=
k )
336 PROT2(
"/%i)",
dat.numberofdestbasismonoms );
380 PROT2(
"deg= %i ", deg );
382 dat.monlistblock= 512;
383 dat.monlistmax=
dat.monlistblock;
384#ifdef HAVE_EXPLICIT_CONSTR
387 for (
j=
dat.monlistmax - 1;
j >= 0;
j-- )
dat.monlist[
j].homogElem();
394 dat.numberofdestbasismonoms= 0;
397 generateMonoms( start, 1, deg, &
dat );
415#ifdef HAVE_EXPLICIT_CONSTR
418 delete []
dat.monlist;
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
intvec * hFirstSeries(ideal A, intvec *module_w, ideal Q, intvec *wdegree)
static BOOLEAN length(leftv result, leftv arg)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define omFreeSize(addr, size)
#define omReallocSize(addr, o_size, size)
void pEnlargeSet(poly **p, int l, int increment)
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
#define pCopy(p)
return a copy of the poly
ideal idInit(int idsize, int rank)
initialise an ideal / module
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size