Data Structures | Macros | Functions
fglm.h File Reference
#include <kernel/polys.h>
#include <kernel/structs.h>
#include <kernel/fglm/fglmvec.h>

Go to the source code of this file.

Data Structures

class  fglmSelem
 
class  fglmDelem
 

Macros

#define PROT(msg)
 
#define STICKYPROT(msg)   if (BTEST1(OPT_PROT)) Print(msg)
 
#define PROT2(msg, arg)
 
#define STICKYPROT2(msg, arg)   if (BTEST1(OPT_PROT)) Print(msg,arg)
 
#define fglmASSERT(ignore1, ignore2)
 

Functions

BOOLEAN fglmzero (ring sourceRing, ideal &sourceIdeal, ring destRing, ideal &destideal, BOOLEAN switchBack=TRUE, BOOLEAN deleteIdeal=FALSE)
 
BOOLEAN fglmquot (ideal sourceIdeal, poly quot, ideal &destIdeal)
 
poly fglmLinearCombination (ideal source, poly monset)
 
poly fglmNewLinearCombination (ideal source, poly monset)
 

Macro Definition Documentation

◆ fglmASSERT

#define fglmASSERT (   ignore1,
  ignore2 
)

Definition at line 23 of file fglm.h.

◆ PROT

#define PROT (   msg)

Definition at line 19 of file fglm.h.

◆ PROT2

#define PROT2 (   msg,
  arg 
)

Definition at line 21 of file fglm.h.

◆ STICKYPROT

#define STICKYPROT (   msg)    if (BTEST1(OPT_PROT)) Print(msg)

Definition at line 20 of file fglm.h.

◆ STICKYPROT2

#define STICKYPROT2 (   msg,
  arg 
)    if (BTEST1(OPT_PROT)) Print(msg,arg)

Definition at line 22 of file fglm.h.

Function Documentation

◆ fglmLinearCombination()

poly fglmLinearCombination ( ideal  source,
poly  monset 
)

Definition at line 417 of file fglmcomb.cc.

418 {
419  int k;
420  poly temp;
421 
422  polyset m;
423  polyset nf;
424  fglmVector * v;
425 
426  polyset basis;
427  int basisSize = 0;
428  int basisBS = 16;
429  int basisMax;
430  // get number of monomials in monset
431  int numMonoms = 0;
432  temp = monset;
433  while ( temp != NULL ) {
434  numMonoms++;
435  pIter( temp );
436  }
437  // Allocate Memory
438  m= (polyset)omAlloc( numMonoms * sizeof( poly ) );
439  nf= (polyset)omAlloc( numMonoms * sizeof( poly ) );
440  // Warning: The fglmVectors in v are yet not initialized
441  v= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
442  basisMax= basisBS;
443  basis= (polyset)omAlloc( basisMax * sizeof( poly ) );
444 
445  // get the NormalForm and the basis monomials
446  temp= monset;
447  for ( k= 0; k < numMonoms; k++ ) {
448  poly mon= pHead( temp );
449  if ( ! nIsOne( pGetCoeff( mon ) ) ) {
450  nDelete( & pGetCoeff( mon ) );
451  pSetCoeff( mon, nInit( 1 ) );
452  }
453  STICKYPROT( "(" );
454  nf[k]= kNF( source, currRing->qideal, mon );
455  STICKYPROT( ")" );
456 
457  // search through basis
458  STICKYPROT( "[" );
459  poly sm = nf[k];
460  while ( sm != NULL ) {
461  BOOLEAN found = FALSE;
462  int b;
463  for ( b= 0; (b < basisSize) && (found == FALSE); b++ )
464  if ( pLmEqual( sm, basis[b] ) ) found= TRUE;
465  if ( found == FALSE ) {
466  // Expand the basis
467  if ( basisSize == basisMax ) {
468  basis= (polyset)omReallocSize( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
469  basisMax+= basisBS;
470  }
471  basis[basisSize]= pHead( sm );
472  nDelete( & pGetCoeff( basis[basisSize] ) );
473  pSetCoeff( basis[basisSize], nInit( 1 ) );
474  basisSize++;
475  }
476  pIter( sm );
477  }
478  STICKYPROT( "]" );
479  m[k]= mon;
480  pIter( temp );
481  }
482  // get the vector representation
483  STICKYPROT2( "(%i)", basisSize );
484  for ( k= 0; k < numMonoms; k++ ) {
485 #ifndef HAVE_EXPLICIT_CONSTR
486  v[k].mac_constr_i( basisSize );
487 #else
488  v[k].fglmVector( basisSize );
489 #endif
490  STICKYPROT( "(+" );
491  poly mon= nf[k];
492  while ( mon != NULL ) {
493  BOOLEAN found = FALSE;
494  int b= 0;
495  while ( found == FALSE ) {
496  if ( pLmEqual( mon, basis[b] ) )
497  found= TRUE;
498  else
499  b++;
500  }
501  number coeff = nCopy( pGetCoeff( mon ) );
502  v[k].setelem( b+1, coeff );
503  pIter( mon );
504  }
505  STICKYPROT( ")" );
506  }
507  // gauss reduce
508  gaussReducer gauss( basisSize );
509  BOOLEAN isZero = FALSE;
510  fglmVector p;
511  for ( k= 0; (k < numMonoms) && (isZero == FALSE); k++ ) {
512  STICKYPROT( "(-" );
513  if ( ( isZero= gauss.reduce( v[k] )) == TRUE )
514  p= gauss.getDependence();
515  else
516  gauss.store();
517  STICKYPROT( ")" );
518  }
519  poly comb = NULL;
520  if ( isZero == TRUE ) {
521  number gcd = p.gcd();
522  if ( ! nIsZero( gcd ) && ! ( nIsOne( gcd ) ) )
523  p/= gcd;
524  nDelete( & gcd );
525  for ( k= 1; k <= p.size(); k++ ) {
526  if ( ! p.elemIsZero( k ) ) {
527  poly temp = pCopy( m[k-1] );
528  pSetCoeff( temp, nCopy( p.getconstelem( k ) ) );
529  comb= pAdd( comb, temp );
530  }
531  }
532  if ( ! nGreaterZero( pGetCoeff( comb ) ) ) comb= pNeg( comb );
533  }
534 
535  // Free Memory
536  for ( k= 0; k < numMonoms; k++ ) {
537  pDelete( m + k );
538  pDelete( nf + k );
539  }
540  omFreeSize( (ADDRESS)m, numMonoms * sizeof( poly ) );
541  omFreeSize( (ADDRESS)nf, numMonoms * sizeof( poly ) );
542  // Warning: At this point all Vectors in v have to be initialized
543  for ( k= numMonoms - 1; k >= 0; k-- ) v[k].~fglmVector();
544  omFreeSize( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
545  for ( k= 0; k < basisSize; k++ )
546  pDelete( basis + k );
547  omFreeSize( (ADDRESS)basis, basisMax * sizeof( poly ) );
548  STICKYPROT( "\n" );
549  return comb;
550 }
fglmVector(fglmVectorRep *rep)
Implementation of class fglmVector
Definition: fglmvec.cc:153
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition: kstd1.cc:2971
#define pAdd(p, q)
Definition: polys.h:186
#define FALSE
Definition: auxiliary.h:94
int size() const
Definition: fglmvec.cc:208
return P p
Definition: myNF.cc:203
number getconstelem(int i) const
Definition: fglmvec.cc:447
number gcd() const
Definition: fglmvec.cc:459
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
#define pNeg(p)
Definition: polys.h:181
#define TRUE
Definition: auxiliary.h:98
#define nIsOne(n)
Definition: numbers.h:25
void * ADDRESS
Definition: auxiliary.h:115
int k
Definition: cfEzgcd.cc:93
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
#define omAlloc(size)
Definition: omAllocDecl.h:210
bool found
Definition: facFactorize.cc:56
Definition: gnumpfl.cc:27
#define pIter(p)
Definition: monomials.h:44
#define omReallocSize(addr, o_size, size)
Definition: omAllocDecl.h:220
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
#define STICKYPROT(msg)
Definition: fglm.h:20
int elemIsZero(int i)
Definition: fglmvec.cc:301
#define nGreaterZero(n)
Definition: numbers.h:27
int m
Definition: cfEzgcd.cc:119
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
Definition: polys.h:67
#define nDelete(n)
Definition: numbers.h:16
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define nIsZero(n)
Definition: numbers.h:19
#define NULL
Definition: omList.c:10
poly * polyset
Definition: hutil.h:15
void setelem(int i, number &n)
Definition: fglmvec.cc:452
int gcd(int a, int b)
Definition: walkSupport.cc:839
#define pDelete(p_ptr)
Definition: polys.h:169
#define nCopy(n)
Definition: numbers.h:15
bool isZero(const CFArray &A)
checks if entries of A are zero
polyrec * poly
Definition: hilb.h:10
#define nInit(i)
Definition: numbers.h:24
int BOOLEAN
Definition: auxiliary.h:85
const poly b
Definition: syzextra.cc:213
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
Definition: polys.h:31
#define pLmEqual(p1, p2)
Definition: polys.h:111
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168
#define STICKYPROT2(msg, arg)
Definition: fglm.h:22

◆ fglmNewLinearCombination()

poly fglmNewLinearCombination ( ideal  source,
poly  monset 
)

Definition at line 154 of file fglmcomb.cc.

155 {
156  polyset m = NULL;
157  polyset nf = NULL;
158  fglmVector * mv = NULL;
159 
160  fglmVector * v = NULL;
161  polyset basis = NULL;
162  int basisSize = 0;
163  int basisBS = 16;
164  int basisMax = basisBS;
165 
166  int * weights = NULL;
167  int * lengthes = NULL;
168  int * order = NULL;
169 
170  int numMonoms = 0;
171  int k;
172 
173  // get number of monoms
174  numMonoms= pLength( monset );
175  STICKYPROT2( "%i monoms\n", numMonoms );
176 
177  // Allcoate Memory and initialize sets
178  m= (polyset)omAlloc( numMonoms * sizeof( poly ) );
179  poly temp= monset;
180  for ( k= 0; k < numMonoms; k++ ) {
181 // m[k]= pOne();
182 // pSetExpV( m[k], temp->exp );
183 // pSetm( m[k] );
184  m[k]=pLmInit(temp);
185  pSetCoeff( m[k], nInit(1) );
186  pIter( temp );
187  }
188 
189  nf= (polyset)omAlloc( numMonoms * sizeof( poly ) );
190 
191 #ifndef HAVE_EXPLICIT_CONSTR
192  mv= new fglmVector[ numMonoms ];
193 #else
194  mv= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
195 #endif
196 
197 #ifndef HAVE_EXPLICIT_CONSTR
198  v= new fglmVector[ numMonoms ];
199 #else
200  v= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
201 #endif
202 
203  basisMax= basisBS;
204  basis= (polyset)omAlloc( basisMax * sizeof( poly ) );
205 
206  weights= (int *)omAlloc( IDELEMS( source ) * sizeof( int ) );
207  STICKYPROT( "weights: " );
208  for ( k= 0; k < IDELEMS( source ); k++ ) {
209  poly temp= (source->m)[k];
210  int w = 0;
211  while ( temp != NULL ) {
212  w+= nSize( pGetCoeff( temp ) );
213  pIter( temp );
214  }
215  weights[k]= w;
216  STICKYPROT2( "%i ", w );
217  }
218  STICKYPROT( "\n" );
219  lengthes= (int *)omAlloc( numMonoms * sizeof( int ) );
220  order= (int *)omAlloc( numMonoms * sizeof( int ) );
221 
222  // calculate the NormalForm in a special way
223  for ( k= 0; k < numMonoms; k++ )
224  {
225  STICKYPROT( "#" );
226  poly current = pCopy( m[k] );
227  fglmVector currV( numMonoms, k+1 );
228 
229  fglmReduce( & current, currV, m, numMonoms, source, weights );
230  poly temp = current;
231  int b;
232  while ( temp != NULL )
233  {
234  BOOLEAN found = FALSE;
235  for ( b= 0; (b < basisSize) && (found == FALSE); b++ )
236  {
237  if ( pLmEqual( temp, basis[b] ) )
238  {
239  found= TRUE;
240  }
241  }
242  if ( found == FALSE )
243  {
244  if ( basisSize == basisMax )
245  {
246  // Expand the basis
247  basis= (polyset)omReallocSize( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
248  basisMax+= basisBS;
249  }
250 // basis[basisSize]= pOne();
251 // pSetExpV( basis[basisSize], temp->exp );
252 // pSetm( basis[basisSize] );
253  basis[basisSize]=pLmInit(temp);
254  pSetCoeff( basis[basisSize], nInit(1) );
255  basisSize++;
256  }
257  pIter( temp );
258  }
259  nf[k]= current;
260 #ifndef HAVE_EXPLICIT_CONSTR
261  mv[k].mac_constr( currV );
262 #else
263  mv[k].fglmVector( currV );
264 #endif
265  STICKYPROT( "\n" );
266  }
267  // get the vector representation
268  for ( k= 0; k < numMonoms; k++ ) {
269  STICKYPROT( "." );
270 
271 #ifndef HAVE_EXPLICIT_CONSTR
272  v[k].mac_constr_i( basisSize );
273 #else
274  v[k].fglmVector( basisSize );
275 #endif
276  poly mon= nf[k];
277  while ( mon != NULL ) {
278  BOOLEAN found = FALSE;
279  int b= 0;
280  while ( found == FALSE ) {
281  if ( pLmEqual( mon, basis[b] ) ) {
282  found= TRUE;
283  }
284  else {
285  b++;
286  }
287  }
288  number coeff = nCopy( pGetCoeff( mon ) );
289  v[k].setelem( b+1, coeff );
290  pIter( mon );
291  }
292  pDelete( nf + k );
293  }
294  // Free Memory not needed anymore
295  omFreeSize( (ADDRESS)nf, numMonoms * sizeof( poly ) );
296  omFreeSize( (ADDRESS)weights, IDELEMS( source ) * sizeof( int ) );
297 
298  STICKYPROT2( "\nbasis size: %i\n", basisSize );
299  STICKYPROT( "(clear basis" );
300  for ( k= 0; k < basisSize; k++ )
301  pDelete( basis + k );
302  STICKYPROT( ")\n" );
303  // gauss reduce
304  gaussReducer gauss( basisSize );
305  BOOLEAN isZero = FALSE;
306  fglmVector p;
307 
308  STICKYPROT( "sizes: " );
309  for ( k= 0; k < numMonoms; k++ ) {
310  lengthes[k]= v[k].numNonZeroElems();
311  STICKYPROT2( "%i ", lengthes[k] );
312  }
313  STICKYPROT( "\n" );
314 
315  int act = 0;
316  while ( (isZero == FALSE) && (act < numMonoms) ) {
317  int best = 0;
318  for ( k= numMonoms - 1; k >= 0; k-- ) {
319  if ( lengthes[k] > 0 ) {
320  if ( best == 0 ) {
321  best= k+1;
322  }
323  else {
324  if ( lengthes[k] < lengthes[best-1] ) {
325  best= k+1;
326  }
327  }
328  }
329  }
330  lengthes[best-1]= 0;
331  order[act]= best-1;
332  STICKYPROT2( " (%i) ", best );
333  if ( ( isZero= gauss.reduce( v[best-1] )) == TRUE ) {
334  p= gauss.getDependence();
335  }
336  else {
337  STICKYPROT( "+" );
338  gauss.store();
339  act++;
340  }
341 #ifndef HAVE_EXPLICIT_CONSTR
342  v[best-1].clearelems();
343 #else
344  v[best-1].~fglmVector();
345 #endif
346  }
347  poly result = NULL;
348  if ( isZero == TRUE ) {
349  number gcd = p.gcd();
350  if ( ! nIsZero( gcd ) && ! ( nIsOne( gcd ) ) ) {
351  p/= gcd;
352  }
353  nDelete( & gcd );
354  fglmVector temp( numMonoms );
355  for ( k= 0; k < p.size(); k++ ) {
356  if ( ! p.elemIsZero( k+1 ) ) {
357  temp+= p.getconstelem( k+1 ) * mv[order[k]];
358  }
359  }
360  number denom = temp.clearDenom();
361  nDelete( & denom );
362  gcd = temp.gcd();
363  if ( ! nIsZero( gcd ) && ! nIsOne( gcd ) ) {
364  temp/= gcd;
365  }
366  nDelete( & gcd );
367 
368  poly sum = NULL;
369  for ( k= 1; k <= numMonoms; k++ ) {
370  if ( ! temp.elemIsZero( k ) ) {
371  if ( result == NULL ) {
372  result= pCopy( m[k-1] );
373  sum= result;
374  }
375  else {
376  sum->next= pCopy( m[k-1] );
377  pIter( sum );
378  }
379  pSetCoeff( sum, nCopy( temp.getconstelem( k ) ) );
380  }
381  }
382  p_Content( result, currRing );
383  if ( ! nGreaterZero( pGetCoeff( result ) ) ) result= pNeg( result );
384  }
385  // Free Memory
386  omFreeSize( (ADDRESS)lengthes, numMonoms * sizeof( int ) );
387  omFreeSize( (ADDRESS)order, numMonoms * sizeof( int ) );
388 // for ( k= 0; k < numMonoms; k++ )
389 // v[k].~fglmVector();
390 #ifndef HAVE_EXPLICIT_CONSTR
391  delete [] v;
392 #else
393  omFreeSize( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
394 #endif
395 
396  for ( k= 0; k < basisSize; k++ )
397  pDelete( basis + k );
398  omFreeSize( (ADDRESS)basis, basisMax * sizeof( poly ) );
399 
400 #ifndef HAVE_EXPLICIT_CONSTR
401  delete [] mv;
402 #else
403  for ( k= 0; k < numMonoms; k++ )
404  mv[k].~fglmVector();
405  omFreeSize( (ADDRESS)mv, numMonoms * sizeof( fglmVector ) );
406 #endif
407 
408  for ( k= 0; k < numMonoms; k++ )
409  pDelete( m + k );
410  omFreeSize( (ADDRESS)m, numMonoms * sizeof( poly ) );
411 
412  STICKYPROT( "\n" );
413  return result;
414 }
int numNonZeroElems() const
Definition: fglmvec.cc:213
fglmVector(fglmVectorRep *rep)
Implementation of class fglmVector
Definition: fglmvec.cc:153
#define FALSE
Definition: auxiliary.h:94
int size() const
Definition: fglmvec.cc:208
return P p
Definition: myNF.cc:203
number getconstelem(int i) const
Definition: fglmvec.cc:447
number gcd() const
Definition: fglmvec.cc:459
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
static void fglmReduce(poly *pptr, fglmVector &v, polyset m, int numMonoms, ideal source, int *w)
Definition: fglmcomb.cc:129
#define pNeg(p)
Definition: polys.h:181
#define TRUE
Definition: auxiliary.h:98
#define nIsOne(n)
Definition: numbers.h:25
~fglmVector()
Definition: fglmvec.cc:175
void * ADDRESS
Definition: auxiliary.h:115
int k
Definition: cfEzgcd.cc:93
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
#define omAlloc(size)
Definition: omAllocDecl.h:210
bool found
Definition: facFactorize.cc:56
Definition: gnumpfl.cc:27
#define pIter(p)
Definition: monomials.h:44
#define omReallocSize(addr, o_size, size)
Definition: omAllocDecl.h:220
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
#define STICKYPROT(msg)
Definition: fglm.h:20
int elemIsZero(int i)
Definition: fglmvec.cc:301
#define nGreaterZero(n)
Definition: numbers.h:27
number clearDenom()
Definition: fglmvec.cc:503
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
Definition: polys.h:64
int m
Definition: cfEzgcd.cc:119
static unsigned pLength(poly a)
Definition: p_polys.h:189
void p_Content(poly ph, const ring r)
Definition: p_polys.cc:2247
#define IDELEMS(i)
Definition: simpleideals.h:24
#define nDelete(n)
Definition: numbers.h:16
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define nIsZero(n)
Definition: numbers.h:19
#define NULL
Definition: omList.c:10
poly * polyset
Definition: hutil.h:15
void setelem(int i, number &n)
Definition: fglmvec.cc:452
int gcd(int a, int b)
Definition: walkSupport.cc:839
const CanonicalForm & w
Definition: facAbsFact.cc:55
#define pDelete(p_ptr)
Definition: polys.h:169
#define nSize(n)
Definition: numbers.h:39
#define nCopy(n)
Definition: numbers.h:15
bool isZero(const CFArray &A)
checks if entries of A are zero
static scmon act
Definition: hdegree.cc:1078
polyrec * poly
Definition: hilb.h:10
#define nInit(i)
Definition: numbers.h:24
int BOOLEAN
Definition: auxiliary.h:85
const poly b
Definition: syzextra.cc:213
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
Definition: polys.h:31
#define pLmEqual(p1, p2)
Definition: polys.h:111
return result
Definition: facAbsBiFact.cc:76
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168
#define STICKYPROT2(msg, arg)
Definition: fglm.h:22

◆ fglmquot()

BOOLEAN fglmquot ( ideal  sourceIdeal,
poly  quot,
ideal &  destIdeal 
)

Definition at line 1215 of file fglmzero.cc.

1216 {
1217  BOOLEAN fglmok;
1218  fglmVector v;
1219 
1220  idealFunctionals L( 100, (currRing->N) );
1221  // STICKYPROT("calculating normal form\n");
1222  // poly p = kNF( sourceIdeal, currRing->qideal, quot );
1223  // STICKYPROT("calculating functionals\n");
1224  fglmok = CalculateFunctionals( sourceIdeal, L, quot, v );
1225  if ( fglmok == TRUE ) {
1226  // STICKYPROT("calculating groebner basis\n");
1227  destIdeal= GroebnerViaFunctionals( L, v );
1228  }
1229  return fglmok;
1230 }
#define TRUE
Definition: auxiliary.h:98
static ideal GroebnerViaFunctionals(const idealFunctionals &l, fglmVector iv=fglmVector())
Definition: fglmzero.cc:1048
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
static BOOLEAN CalculateFunctionals(const ideal &theIdeal, idealFunctionals &l)
Definition: fglmzero.cc:675
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int BOOLEAN
Definition: auxiliary.h:85

◆ fglmzero()

BOOLEAN fglmzero ( ring  sourceRing,
ideal &  sourceIdeal,
ring  destRing,
ideal &  destideal,
BOOLEAN  switchBack = TRUE,
BOOLEAN  deleteIdeal = FALSE 
)

Definition at line 1190 of file fglmzero.cc.

1191 {
1192  ring initialRing = currRing;
1193  BOOLEAN fglmok;
1194 
1195  if ( currRing != sourceRing )
1196  {
1197  rChangeCurrRing( sourceRing );
1198  }
1199  idealFunctionals L( 100, rVar(currRing) );
1200  fglmok = CalculateFunctionals( sourceIdeal, L );
1201  if ( deleteIdeal == TRUE )
1202  idDelete( & sourceIdeal );
1203  rChangeCurrRing( destRing );
1204  if ( fglmok == TRUE )
1205  {
1206  L.map( sourceRing );
1207  destIdeal= GroebnerViaFunctionals( L );
1208  }
1209  if ( (switchBack) && (currRing != initialRing) )
1210  rChangeCurrRing( initialRing );
1211  return fglmok;
1212 }
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:583
#define TRUE
Definition: auxiliary.h:98
static ideal GroebnerViaFunctionals(const idealFunctionals &l, fglmVector iv=fglmVector())
Definition: fglmzero.cc:1048
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
static BOOLEAN CalculateFunctionals(const ideal &theIdeal, idealFunctionals &l)
Definition: fglmzero.cc:675
void rChangeCurrRing(ring r)
Definition: polys.cc:12
int BOOLEAN
Definition: auxiliary.h:85