Data Structures | Macros | Functions | Variables
syzextra.cc File Reference

New implementations for the computation of syzygies and resolutions. More...

#include <kernel/mod2.h>
#include <string.h>
#include "syzextra.h"
#include "DebugPrint.h"
#include <omalloc/omalloc.h>
#include <misc/intvec.h>
#include <misc/options.h>
#include <coeffs/coeffs.h>
#include <polys/monomials/p_polys.h>
#include <polys/monomials/ring.h>
#include <polys/simpleideals.h>
#include <polys/kbuckets.h>
#include <polys/sbuckets.h>
#include <polys/operations/p_Mult_q.h>
#include <kernel/GBEngine/kstd1.h>
#include <kernel/polys.h>
#include <kernel/GBEngine/syz.h>
#include <kernel/ideals.h>
#include <kernel/oswrapper/timer.h>
#include <Singular/tok.h>
#include <Singular/ipid.h>
#include <Singular/lists.h>
#include <Singular/attrib.h>
#include <Singular/ipshell.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

class  SBucketWrapper
 
class  CDivisorEnumerator
 TODO: More...
 
class  CDivisorEnumerator2
 TODO: More...
 

Macros

#define _GNU_SOURCE   /*for qsort_r on cygwin, must be before system includes*/
 
#define RTIMER_BENCHMARKING   0
 
#define qsort_my(m, s, ss, r, cmp)   qsort(m, s, ss, cmp)
 

Functions

 USING_NAMESPACE (SINGULARXXNAME::DEBUG) BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SYZEXTRA) BEGIN_NAMESPACE_NONAME ring SBucketFactory
 
static FORCE_INLINE poly pp_Add_qq (const poly a, const poly b, const ring R)
 
static FORCE_INLINE poly p_VectorProductLT (poly s, const ideal &L, const ideal &T, const ring &R)
 
static FORCE_INLINE int atGetInt (idhdl rootRingHdl, const char *attribute, long def)
 
END_NAMESPACE BEGIN_NAMESPACE (SORT_c_ds) static int cmp_c_ds(const void *p1
 
 assume (R!=NULL)
 
 assume (r==currRing)
 
 assume (a!=NULL)
 
 assume (b!=NULL)
 
 p_LmTest (a, r)
 
 p_LmTest (b, r)
 
 if (OPT__DEBUG)
 
 if (iCompDiff > 0) return YES
 
 if (iCompDiff< 0) return NO
 
 assume (iCompDiff==0)
 
 if (iDegDiff > 0) return YES
 
 assume (iDegDiff==0)
 
 for (int v=rVar(r);v > 0;v--)
 
static END_NAMESPACE void writeLatexTerm (const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
 writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p More...
 
static FORCE_INLINE poly myp_Head (const poly p, const bool bIgnoreCoeff, const ring r)
 
poly leadmonom (const poly p, const ring r, const bool bSetZeroComp)
 return a new term: leading coeff * leading monomial of p with 0 leading component! More...
 
poly p_Tail (const poly p, const ring r)
 return the tail of a given polynomial or vector returns NULL if input is NULL, otherwise the result is a new polynomial/vector in the ring r More...
 
ideal id_Tail (const ideal id, const ring r)
 return the tail of a given ideal or module returns NULL if input is NULL, otherwise the result is a new ideal/module in the ring r NOTE: the resulting rank is autocorrected More...
 
void Sort_c_ds (const ideal id, const ring r)
 inplace sorting of the module (ideal) id wrt <_(c,ds) More...
 
bool my_p_LmCmp (poly a, poly b, const ring r)
 
static BOOLEAN _p_LmDivisibleByNoComp (const poly a, const poly b, const poly c, const ring r)
 _p_LmDivisibleByNoComp for a | b*c More...
 

Variables

END_NAMESPACE const void * p2 { void *R = currRing
 
const int YES = 1
 
const int NO = -1
 
const ring r = (const ring) R
 
const poly a = *(const poly*)p1
 
const poly b = *(const poly*)p2
 
const signed long iCompDiff = p_GetComp(a, r) - p_GetComp(b, r)
 
const int OPT__DEBUG = 0
 
const signed long iDegDiff = p_Totaldegree(a, r) - p_Totaldegree(b, r)
 
 return
 

Detailed Description

New implementations for the computation of syzygies and resolutions.

ABSTRACT: Computation of Syzygies due to Schreyer

Author
Oleksandr Motsak

Definition in file syzextra.cc.

Macro Definition Documentation

#define _GNU_SOURCE   /*for qsort_r on cygwin, must be before system includes*/

Definition at line 18 of file syzextra.cc.

#define qsort_my (   m,
  s,
  ss,
  r,
  cmp 
)    qsort(m, s, ss, cmp)
#define RTIMER_BENCHMARKING   0

Definition at line 64 of file syzextra.cc.

Function Documentation

static BOOLEAN _p_LmDivisibleByNoComp ( const poly  a,
const poly  b,
const poly  c,
const ring  r 
)
inlinestatic

_p_LmDivisibleByNoComp for a | b*c

Definition at line 2161 of file syzextra.cc.

2162 {
2163  int i=r->VarL_Size - 1;
2164  unsigned long divmask = r->divmask;
2165  unsigned long la, lb;
2166 
2167  if (r->VarL_LowIndex >= 0)
2168  {
2169  i += r->VarL_LowIndex;
2170  do
2171  {
2172  la = a->exp[i];
2173  lb = b->exp[i] + c->exp[i];
2174  if ((la > lb) ||
2175  (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
2176  {
2178  return FALSE;
2179  }
2180  i--;
2181  }
2182  while (i>=r->VarL_LowIndex);
2183  }
2184  else
2185  {
2186  do
2187  {
2188  la = a->exp[r->VarL_Offset[i]];
2189  lb = b->exp[r->VarL_Offset[i]] + c->exp[r->VarL_Offset[i]];
2190  if ((la > lb) ||
2191  (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
2192  {
2194  return FALSE;
2195  }
2196  i--;
2197  }
2198  while (i>=0);
2199  }
2200 #ifdef HAVE_RINGS
2201  assume( !rField_is_Ring(r) ); // not implemented for rings...!
2202 #endif
2203  return TRUE;
2204 }
const poly a
Definition: syzextra.cc:212
#define FALSE
Definition: auxiliary.h:140
assume(R!=NULL)
BOOLEAN p_DebugLmDivisibleByNoComp(poly a, poly b, ring r)
Definition: pDebug.cc:140
#define TRUE
Definition: auxiliary.h:144
const ring r
Definition: syzextra.cc:208
int i
Definition: cfEzgcd.cc:123
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:437
#define pDivAssume(x)
Definition: p_polys.h:1210
const poly b
Definition: syzextra.cc:213
assume ( R!  = NULL)
assume ( r  = =currRing)
assume ( a!  = NULL)
assume ( b!  = NULL)
assume ( iCompDiff  = =0)
assume ( iDegDiff  = =0)
static FORCE_INLINE int atGetInt ( idhdl  rootRingHdl,
const char *  attribute,
long  def 
)
static

Definition at line 188 of file syzextra.cc.

189 {
190  return ((int)(long)(atGet(rootRingHdl, attribute, INT_CMD, (void*)def)));
191 }
Definition: tok.h:85
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
Definition: attrib.cc:135
END_NAMESPACE BEGIN_NAMESPACE ( SORT_c_ds  ) const
for ( int  v = rVar(r); v,
0;v--   
)

Definition at line 264 of file syzextra.cc.

265  {
266  assume( v > 0 );
267  assume( v <= rVar(r) );
268 
269  const signed int d = p_GetExp(a, v, r) - p_GetExp(b, v, r);
270 
271  if( d > 0 )
272  return YES;
273 
274  if( d < 0 )
275  return NO;
276 
277  assume( d == 0 );
278  }
const poly a
Definition: syzextra.cc:212
assume(R!=NULL)
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
const ring r
Definition: syzextra.cc:208
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
const int YES
Definition: syzextra.cc:205
const int NO
Definition: syzextra.cc:206
const poly b
Definition: syzextra.cc:213
ideal id_Tail ( const ideal  id,
const ring  r 
)

return the tail of a given ideal or module returns NULL if input is NULL, otherwise the result is a new ideal/module in the ring r NOTE: the resulting rank is autocorrected

Definition at line 510 of file syzextra.cc.

511 {
512  if( UNLIKELY(id == NULL) )
513  return NULL;
514 
515  const ideal newid = idInit(IDELEMS(id),id->rank);
516 
517  for (int i=IDELEMS(id) - 1; i >= 0; i--)
518  newid->m[i] = p_Tail( id->m[i], r );
519 
520  newid->rank = id_RankFreeModule(newid, currRing);
521 
522  return newid;
523 }
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
poly p_Tail(const poly p, const ring r)
return the tail of a given polynomial or vector returns NULL if input is NULL, otherwise the result i...
Definition: syzextra.cc:501
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
const ring r
Definition: syzextra.cc:208
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
#define NULL
Definition: omList.c:10
if ( OPT__DEBUG  )

Definition at line 230 of file syzextra.cc.

231  {
232  PrintS("cmp_c_ds: a, b: \np1: "); dPrint(a, r, r, 0);
233  PrintS("b: "); dPrint(b, r, r, 0);
234  PrintLn();
235  }
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:322
const ring r
Definition: syzextra.cc:208
void PrintS(const char *s)
Definition: reporter.cc:294
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
const poly b
Definition: syzextra.cc:213
if ( iCompDiff  ,
 
)
if ( )
if ( iDegDiff  ,
 
)
poly leadmonom ( const poly  p,
const ring  r,
const bool  bSetZeroComp 
)

return a new term: leading coeff * leading monomial of p with 0 leading component!

Definition at line 473 of file syzextra.cc.

474 {
475  if( UNLIKELY(p == NULL ) )
476  return NULL;
477 
478  assume( p != NULL );
479  p_LmTest(p, r);
480 
481  poly m = p_LmInit(p, r);
482  p_SetCoeff0(m, n_Copy(p_GetCoeff(p, r), r), r);
483 
484  if( bSetZeroComp )
485  p_SetComp(m, 0, r);
486 
487  p_Setm(m, r);
488 
489  assume( m != NULL );
490  assume( pNext(m) == NULL );
491  p_LmTest(m, r);
492 
493  if( bSetZeroComp )
494  assume( p_GetComp(m, r) == 0 );
495 
496  return m;
497 }
return P p
Definition: myNF.cc:203
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:236
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const ring r
Definition: syzextra.cc:208
int m
Definition: cfEzgcd.cc:119
p_LmTest(a, r)
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:452
BEGIN_NAMESPACE_SINGULARXX const ring const bool bSetZeroComp
Definition: syzextra.h:47
#define pNext(p)
Definition: monomials.h:43
static poly p_LmInit(poly p, const ring r)
Definition: p_polys.h:1263
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:436
#define p_GetCoeff(p, r)
Definition: monomials.h:57
#define p_SetCoeff0(p, n, r)
Definition: monomials.h:68
polyrec * poly
Definition: hilb.h:10
bool my_p_LmCmp ( poly  a,
poly  b,
const ring  r 
)

Definition at line 1590 of file syzextra.cc.

1590 { return p_LmCmp(a, b, r) == -1; } // TODO: change to simple lex. memory compare!
const poly a
Definition: syzextra.cc:212
const ring r
Definition: syzextra.cc:208
static int p_LmCmp(poly p, poly q, const ring r)
Definition: p_polys.h:1472
const poly b
Definition: syzextra.cc:213
static FORCE_INLINE poly myp_Head ( const poly  p,
const bool  bIgnoreCoeff,
const ring  r 
)
static

Definition at line 456 of file syzextra.cc.

457 {
458  assume( p != NULL ); p_LmCheckPolyRing1(p, r);
459 
460  poly np; omTypeAllocBin(poly, np, r->PolyBin);
461  p_SetRingOfLm(np, r);
462  memcpy(np->exp, p->exp, r->ExpL_Size*sizeof(long));
463  pNext(np) = NULL;
464  pSetCoeff0(np, (bIgnoreCoeff)? NULL : n_Copy(pGetCoeff(p), r->cf));
465 
466  p_LmCheckPolyRing1(np, r);
467  return np;
468 }
return P p
Definition: myNF.cc:203
assume(R!=NULL)
#define omTypeAllocBin(type, addr, bin)
Definition: omAllocDecl.h:203
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
const ring r
Definition: syzextra.cc:208
#define p_SetRingOfLm(p, r)
Definition: monomials.h:152
#define p_LmCheckPolyRing1(p, r)
Definition: monomials.h:185
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:452
#define pNext(p)
Definition: monomials.h:43
#define pSetCoeff0(p, n)
Definition: monomials.h:67
polyrec * poly
Definition: hilb.h:10
p_LmTest ( a  ,
r   
)
p_LmTest ( b  ,
r   
)
poly p_Tail ( const poly  p,
const ring  r 
)

return the tail of a given polynomial or vector returns NULL if input is NULL, otherwise the result is a new polynomial/vector in the ring r

Definition at line 501 of file syzextra.cc.

502 {
503  if( UNLIKELY(p == NULL) )
504  return NULL;
505  else
506  return p_Copy( pNext(p), r );
507 }
return P p
Definition: myNF.cc:203
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
const ring r
Definition: syzextra.cc:208
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
static FORCE_INLINE poly p_VectorProductLT ( poly  s,
const ideal &  L,
const ideal &  T,
const ring &  R 
)
static

Definition at line 158 of file syzextra.cc.

159 {
160  assume( IDELEMS(L) == IDELEMS(T) );
161  poly vp = NULL; // resulting vector product
162 
163  while( s != NULL )
164  {
165  const poly nxt = pNext(s);
166  pNext(s) = NULL;
167 
168  if( !n_IsZero( p_GetCoeff(s, R), R) )
169  {
170  const int i = p_GetComp(s, R) - 1;
171  assume( i >= 0 ); assume( i < IDELEMS(L) );
172  p_SetComp(s, 0, R); p_SetmComp(s, R);
173 
174  vp = p_Add_q( vp, pp_Mult_qq( s, L->m[i], R ), R);
175  vp = p_Add_q( vp, pp_Mult_qq( s, T->m[i], R ), R);
176  }
177 
178  p_Delete(&s, R);
179 
180  s = nxt;
181  };
182 
183  assume( s == NULL );
184 
185  return vp;
186 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:236
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
static poly pp_Mult_qq(poly p, poly q, const ring r)
Definition: p_polys.h:1075
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition: coeffs.h:465
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define p_SetmComp
Definition: p_polys.h:233
#define NULL
Definition: omList.c:10
#define R
Definition: sirandom.c:26
#define pNext(p)
Definition: monomials.h:43
#define p_GetCoeff(p, r)
Definition: monomials.h:57
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
static FORCE_INLINE poly pp_Add_qq ( const poly  a,
const poly  b,
const ring  R 
)
static

Definition at line 153 of file syzextra.cc.

154 {
155  return p_Add_q( p_Copy(a, R), p_Copy(b, R), R );
156 }
const poly a
Definition: syzextra.cc:212
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
#define R
Definition: sirandom.c:26
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
const poly b
Definition: syzextra.cc:213
void Sort_c_ds ( const ideal  id,
const ring  r 
)

inplace sorting of the module (ideal) id wrt <_(c,ds)

Definition at line 527 of file syzextra.cc.

528 {
529  const int sizeNew = IDELEMS(id);
530 
531 #if ( (defined(HAVE_QSORT_R)) && (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FreeBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9) )
532 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, r, cmp)
533 #elif ( (defined(HAVE_QSORT_R)) && (defined _GNU_SOURCE || defined __GNU__ || defined __linux__))
534 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, cmp, r)
535 #else
536 #define qsort_my(m, s, ss, r, cmp) qsort(m, s, ss, cmp)
537 #endif
538 
539  if( sizeNew >= 2 )
540  qsort_my(id->m, sizeNew, sizeof(poly), r, FROM_NAMESPACE(SORT_c_ds, cmp_c_ds));
541 
542 #undef qsort_my
543 
544  id->rank = id_RankFreeModule(id, r);
545 }
#define qsort_my(m, s, ss, r, cmp)
const ring r
Definition: syzextra.cc:208
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
#define IDELEMS(i)
Definition: simpleideals.h:24
#define FROM_NAMESPACE(a, s)
polyrec * poly
Definition: hilb.h:10
USING_NAMESPACE ( SINGULARXXNAME::DEBUG  )

Definition at line 68 of file syzextra.cc.

78 {
79  assume( bt != NULL );
80  return sBucketGetRing(bt);
81 }
assume(R!=NULL)
ring sBucketGetRing(const sBucket_pt bucket)
Returns bucket ring.
Definition: sbuckets.cc:56
#define NULL
Definition: omList.c:10
static END_NAMESPACE void writeLatexTerm ( const poly  t,
const ring  r,
const bool  bCurrSyz = true,
const bool  bLTonly = true 
)
static

writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p

< needs * before pp or module generator

< need to write something after '-'!

< needs * before module generator?

Definition at line 336 of file syzextra.cc.

337 {
338  if( t == NULL )
339  {
340  PrintS(" 0 ");
341  return;
342  }
343 
344  assume( r != NULL );
345  const coeffs C = r->cf; assume(C != NULL);
346 
347  poly p = t;
348  BOOLEAN writePlus = FALSE;
349 
350  do {
351  assume( p != NULL );
352 
353  // write coef...
354  number& n = p_GetCoeff(p, r);
355 
356  n_Normalize(n, C);
357 
358  BOOLEAN writeMult = FALSE; ///< needs * before pp or module generator
359 
360  BOOLEAN writeOne = FALSE; ///< need to write something after '-'!
361 
362  if( n_IsZero(n, C) )
363  {
364  PrintS( writePlus? " + 0" : " 0 " ); writePlus = TRUE; writeMult = TRUE;
365 // return; // yes?
366  }
367 
368  if (n_IsMOne(n, C))
369  {
370  PrintS(" - "); writeOne = TRUE; writePlus = FALSE;
371  }
372  else if (!n_IsOne(n, C))
373  {
374  if( writePlus && n_GreaterZero(n, C) )
375  PrintS(" + ");
376 
377  StringSetS(""); n_WriteLong(n, C);
378  if (true)
379  {
380  char *s = StringEndS(); PrintS(s); omFree(s);
381  }
382 
383 
384  writeMult = TRUE;
385  writePlus = TRUE;
386  } else
387  writeOne = TRUE;
388 
389  // missing '1' if no PP and gen...!?
390  // write monom...
391  const short N = rVar(r);
392 
393  BOOLEAN wrotePP = FALSE; ///< needs * before module generator?
394 
395  for (short i = 0; i < N; i++)
396  {
397  const long ee = p_GetExp(p, i+1, r);
398 
399  if (ee!=0L)
400  {
401  if (writeMult)
402  {
403  PrintS(" ");
404  writeMult = FALSE;
405  } else
406  if( writePlus )
407  PrintS(" + ");
408 
409  writePlus = FALSE;
410 
411  if (ee != 1L)
412  Print(" %s^{%ld} ", rRingVar(i, r), ee);
413  else
414  Print(" %s ", rRingVar(i, r));
415 
416  writeOne = FALSE;
417  wrotePP = TRUE;
418  }
419  }
420 
421  writePlus = writePlus || wrotePP;
422  writeMult = writeMult || wrotePP;
423 
424  // write module gen...
425  const long comp = p_GetComp(p, r);
426 
427  if (comp > 0 )
428  {
429  if (writeMult)
430  PrintS(" ");
431  else
432  if( writePlus )
433  PrintS(" + ");
434 
435  if (bCurrSyz)
436  Print(" \\\\GEN{%ld} ", comp);
437  else
438  Print(" \\\\GENP{%ld} ", comp);
439 
440  writeOne = FALSE;
441  }
442 
443  if ( writeOne )
444  PrintS( writePlus? " + 1 " : " 1 " );
445 
446 
447  pIter(p);
448 
449  writePlus = TRUE;
450  } while( (!bLTonly) && (p != NULL) );
451 
452 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
#define Print
Definition: emacs.cc:83
#define FALSE
Definition: auxiliary.h:140
return P p
Definition: myNF.cc:203
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:469
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
const CanonicalForm CFMap CFMap int &both_non_zero int n
Definition: cfEzgcd.cc:52
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
#define TRUE
Definition: auxiliary.h:144
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
Definition: coeffs.h:579
char * StringEndS()
Definition: reporter.cc:151
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
#define pIter(p)
Definition: monomials.h:44
const ring r
Definition: syzextra.cc:208
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
#define omFree(addr)
Definition: omAllocDecl.h:261
The main handler for Singular numbers which are suitable for Singular polynomials.
void StringSetS(const char *st)
Definition: reporter.cc:128
int i
Definition: cfEzgcd.cc:123
void PrintS(const char *s)
Definition: reporter.cc:294
static char * rRingVar(short i, const ring r)
Definition: ring.h:525
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition: coeffs.h:465
#define NULL
Definition: omList.c:10
#define p_GetCoeff(p, r)
Definition: monomials.h:57
static FORCE_INLINE BOOLEAN n_IsMOne(number n, const coeffs r)
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
Definition: coeffs.h:473
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2), where m is the long representing n in C: TRUE iff (Im(n) != 0 and Im(n) >= 0) or (Im(n) == 0 and Re(n) >= 0) in K(a)/: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0
Definition: coeffs.h:495
polyrec * poly
Definition: hilb.h:10
int BOOLEAN
Definition: auxiliary.h:131
static FORCE_INLINE void n_WriteLong(number &n, const coeffs r)
write to the output buffer of the currently used reporter
Definition: coeffs.h:584

Variable Documentation

const poly a = *(const poly*)p1

Definition at line 212 of file syzextra.cc.

else L b = *(const poly*)p2

Definition at line 213 of file syzextra.cc.

const signed long iCompDiff = p_GetComp(a, r) - p_GetComp(b, r)

Definition at line 222 of file syzextra.cc.

const signed long iDegDiff = p_Totaldegree(a, r) - p_Totaldegree(b, r)

Definition at line 247 of file syzextra.cc.

const int NO = -1

Definition at line 206 of file syzextra.cc.

const int OPT__DEBUG = 0

Definition at line 229 of file syzextra.cc.

END_NAMESPACE const void* p2 { void *R = currRing

Definition at line 202 of file syzextra.cc.

const ring r = (const ring) R

Definition at line 208 of file syzextra.cc.

return

Definition at line 280 of file syzextra.cc.

const int YES = 1

Definition at line 205 of file syzextra.cc.