My Project
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
monomials.h File Reference
#include "reporter/reporter.h"
#include "coeffs/coeffs.h"

Go to the source code of this file.

Data Structures

struct  poly
 

Macros

#define pNext(p)   ((p)->next)
 
#define pIter(p)   (void)((p) = (p)->next)
 
#define p_GetCoeff(p, r)   pGetCoeff(p)
 
#define pSetCoeff0(p, n)   (p)->coef=(n)
 
#define p_SetCoeff0(p, n, r)   pSetCoeff0(p,n)
 
#define __p_GetComp(p, r)   (p)->exp[r->pCompIndex]
 
#define p_GetComp(p, r)   ((long) (r->pCompIndex >= 0 ? __p_GetComp(p, r) : 0))
 
#define pAssumeReturn(cond)
 
#define pAssume(cond)
 
#define _pPolyAssumeReturn(cond, p, r)
 
#define _pPolyAssume(cond, p, r)
 
#define _pPolyAssumeReturnMsg(cond, msg, p, r)
 
#define pPolyAssume(cond)   _pPolyAssume(cond, p, r)
 
#define pPolyAssumeReturn(cond)   _pPolyAssumeReturn(cond, p, r)
 
#define pPolyAssumeReturnMsg(cond, msg)   _pPolyAssumeReturnMsg(cond, msg, p, r)
 
#define pFalseReturn(cond)   do {if (! (cond)) return FALSE;} while (0)
 
#define p_SetRingOfLm(p, r)   do {} while (0)
 
#define pAssume1(cond)   do {} while (0)
 
#define pPolyAssume1(cond)   do {} while (0)
 
#define _pPolyAssume1(cond, p, r)   do {} while (0)
 
#define pAssumeReturn1(cond)   do {} while (0)
 
#define pPolyAssumeReturn1(cond)   do {} while (0)
 
#define _pPolyAssumeReturn1(cond, p, r)   do {} while (0)
 
#define p_LmCheckPolyRing1(p, r)   do {} while (0)
 
#define p_CheckRing1(r)   do {} while (0)
 
#define pIfThen1(cond, check)   do {} while (0)
 
#define pAssume2(cond)   do {} while (0)
 
#define pPolyAssume2(cond)   do {} while (0)
 
#define _pPolyAssume2(cond, p, r)   do {} while (0)
 
#define pAssumeReturn2(cond)   do {} while (0)
 
#define pPolyAssumeReturn2(cond)   do {} while (0)
 
#define _pPolyAssumeReturn2(cond, p, r)   do {} while (0)
 
#define p_LmCheckPolyRing2(p, r)   do {} while (0)
 
#define p_CheckRing2(r)   do {} while (0)
 
#define pIfThen2(cond, check)   do {} while (0)
 
#define p_AllocBin(p, bin, r)
 
#define p_FreeBinAddr(p, r)   p_LmFree(p, r)
 
#define POLYSIZE   (sizeof(poly) + sizeof(number))
 
#define POLYSIZEW   (POLYSIZE / sizeof(long))
 
#define POLY_NEGWEIGHT_OFFSET   (((long)0x80000000) << 32)
 
#define p_AllocBin(p, bin, r)
 
#define p_FreeBinAddr(p, r)   p_LmFree(p, r)
 
#define rRing_has_Comp(r)   (r->pCompIndex >= 0)
 

Functions

static number & pGetCoeff (poly p)
 return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy More...
 
BOOLEAN dPolyReportError (poly p, ring r, const char *fmt,...)
 

Data Structure Documentation

◆ spolyrec

struct spolyrec

Definition at line 22 of file monomials.h.

Data Fields
number coef
unsigned long exp[1]
poly next

Macro Definition Documentation

◆ __p_GetComp

#define __p_GetComp (   p,
 
)    (p)->exp[r->pCompIndex]

Definition at line 63 of file monomials.h.

◆ _pPolyAssume

#define _pPolyAssume (   cond,
  p,
 
)
Value:
do \
{ \
if (! (cond)) \
{ \
dPolyReportError(p, r, "pPolyAssume violation of: %s", \
#cond); \
} \
} \
while (0)
int p
Definition: cfModGcd.cc:4078

Definition at line 113 of file monomials.h.

◆ _pPolyAssume1

#define _pPolyAssume1 (   cond,
  p,
 
)    do {} while (0)

Definition at line 173 of file monomials.h.

◆ _pPolyAssume2

#define _pPolyAssume2 (   cond,
  p,
 
)    do {} while (0)

Definition at line 195 of file monomials.h.

◆ _pPolyAssumeReturn

#define _pPolyAssumeReturn (   cond,
  p,
 
)
Value:
do \
{ \
if (! (cond)) \
{ \
dPolyReportError(p, r, "pPolyAssume violation of: %s", \
#cond); \
return FALSE; \
} \
} \
while (0)
#define FALSE
Definition: auxiliary.h:96

Definition at line 101 of file monomials.h.

◆ _pPolyAssumeReturn1

#define _pPolyAssumeReturn1 (   cond,
  p,
 
)    do {} while (0)

Definition at line 176 of file monomials.h.

◆ _pPolyAssumeReturn2

#define _pPolyAssumeReturn2 (   cond,
  p,
 
)    do {} while (0)

Definition at line 198 of file monomials.h.

◆ _pPolyAssumeReturnMsg

#define _pPolyAssumeReturnMsg (   cond,
  msg,
  p,
 
)
Value:
do \
{ \
if (! (cond)) \
{ \
dPolyReportError(p, r, "%s ", msg); \
return FALSE; \
} \
} \
while (0)

Definition at line 124 of file monomials.h.

◆ p_AllocBin [1/2]

#define p_AllocBin (   p,
  bin,
 
)
Value:
do \
{ \
omTypeAllocBin(poly, p, bin); \
p_SetRingOfLm(p, r); \
} \
while (0)

Definition at line 248 of file monomials.h.

◆ p_AllocBin [2/2]

#define p_AllocBin (   p,
  bin,
 
)
Value:
do \
{ \
omTypeAllocBin(poly, p, bin); \
p_SetRingOfLm(p, r); \
} \
while (0)

Definition at line 248 of file monomials.h.

◆ p_CheckRing1

#define p_CheckRing1 (   r)    do {} while (0)

Definition at line 178 of file monomials.h.

◆ p_CheckRing2

#define p_CheckRing2 (   r)    do {} while (0)

Definition at line 200 of file monomials.h.

◆ p_FreeBinAddr [1/2]

#define p_FreeBinAddr (   p,
 
)    p_LmFree(p, r)

Definition at line 255 of file monomials.h.

◆ p_FreeBinAddr [2/2]

#define p_FreeBinAddr (   p,
 
)    p_LmFree(p, r)

Definition at line 255 of file monomials.h.

◆ p_GetCoeff

#define p_GetCoeff (   p,
 
)    pGetCoeff(p)

Definition at line 50 of file monomials.h.

◆ p_GetComp

#define p_GetComp (   p,
 
)    ((long) (r->pCompIndex >= 0 ? __p_GetComp(p, r) : 0))

Definition at line 64 of file monomials.h.

◆ p_LmCheckPolyRing1

#define p_LmCheckPolyRing1 (   p,
 
)    do {} while (0)

Definition at line 177 of file monomials.h.

◆ p_LmCheckPolyRing2

#define p_LmCheckPolyRing2 (   p,
 
)    do {} while (0)

Definition at line 199 of file monomials.h.

◆ p_SetCoeff0

#define p_SetCoeff0 (   p,
  n,
 
)    pSetCoeff0(p,n)

Definition at line 60 of file monomials.h.

◆ p_SetRingOfLm

#define p_SetRingOfLm (   p,
 
)    do {} while (0)

Definition at line 144 of file monomials.h.

◆ pAssume

#define pAssume (   cond)
Value:
do \
{ \
if (! (cond)) \
{ \
dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
#cond); \
} \
} \
while (0)
#define NULL
Definition: omList.c:12

Definition at line 90 of file monomials.h.

◆ pAssume1

#define pAssume1 (   cond)    do {} while (0)

Definition at line 171 of file monomials.h.

◆ pAssume2

#define pAssume2 (   cond)    do {} while (0)

Definition at line 193 of file monomials.h.

◆ pAssumeReturn

#define pAssumeReturn (   cond)
Value:
do \
{ \
if (! (cond)) \
{ \
dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
#cond); \
return FALSE; \
} \
} \
while (0)

Definition at line 78 of file monomials.h.

◆ pAssumeReturn1

#define pAssumeReturn1 (   cond)    do {} while (0)

Definition at line 174 of file monomials.h.

◆ pAssumeReturn2

#define pAssumeReturn2 (   cond)    do {} while (0)

Definition at line 196 of file monomials.h.

◆ pFalseReturn

#define pFalseReturn (   cond)    do {if (! (cond)) return FALSE;} while (0)

Definition at line 139 of file monomials.h.

◆ pIfThen1

#define pIfThen1 (   cond,
  check 
)    do {} while (0)

Definition at line 179 of file monomials.h.

◆ pIfThen2

#define pIfThen2 (   cond,
  check 
)    do {} while (0)

Definition at line 201 of file monomials.h.

◆ pIter

#define pIter (   p)    (void)((p) = (p)->next)

Definition at line 37 of file monomials.h.

◆ pNext

#define pNext (   p)    ((p)->next)

Definition at line 36 of file monomials.h.

◆ POLY_NEGWEIGHT_OFFSET

#define POLY_NEGWEIGHT_OFFSET   (((long)0x80000000) << 32)

Definition at line 236 of file monomials.h.

◆ POLYSIZE

#define POLYSIZE   (sizeof(poly) + sizeof(number))

Definition at line 233 of file monomials.h.

◆ POLYSIZEW

#define POLYSIZEW   (POLYSIZE / sizeof(long))

Definition at line 234 of file monomials.h.

◆ pPolyAssume

#define pPolyAssume (   cond)    _pPolyAssume(cond, p, r)

Definition at line 135 of file monomials.h.

◆ pPolyAssume1

#define pPolyAssume1 (   cond)    do {} while (0)

Definition at line 172 of file monomials.h.

◆ pPolyAssume2

#define pPolyAssume2 (   cond)    do {} while (0)

Definition at line 194 of file monomials.h.

◆ pPolyAssumeReturn

#define pPolyAssumeReturn (   cond)    _pPolyAssumeReturn(cond, p, r)

Definition at line 136 of file monomials.h.

◆ pPolyAssumeReturn1

#define pPolyAssumeReturn1 (   cond)    do {} while (0)

Definition at line 175 of file monomials.h.

◆ pPolyAssumeReturn2

#define pPolyAssumeReturn2 (   cond)    do {} while (0)

Definition at line 197 of file monomials.h.

◆ pPolyAssumeReturnMsg

#define pPolyAssumeReturnMsg (   cond,
  msg 
)    _pPolyAssumeReturnMsg(cond, msg, p, r)

Definition at line 137 of file monomials.h.

◆ pSetCoeff0

#define pSetCoeff0 (   p,
 
)    (p)->coef=(n)

Definition at line 59 of file monomials.h.

◆ rRing_has_Comp

#define rRing_has_Comp (   r)    (r->pCompIndex >= 0)

Definition at line 266 of file monomials.h.

Function Documentation

◆ dPolyReportError()

BOOLEAN dPolyReportError ( poly  p,
ring  r,
const char *  fmt,
  ... 
)

Definition at line 43 of file pDebug.cc.

44{
45 if (d_poly_error_reporting) return FALSE;
47 va_list ap;
48 va_start(ap, fmt);
49
50 fprintf(stderr, "\n// ***dPolyReportError: ");
51 vfprintf(stderr, fmt, ap);
52 fprintf(stderr, "\n occurred at\n");
53 #ifdef HAVE_OMALLOC
55 #endif
56 if (p != NULL)
57 {
58 fprintf(stderr, " occurred for poly: ");
59 p_wrp(p, r);
60 omPrintAddrInfo(stderr, p, " ");
61 }
62 #ifndef MAKE_DISTRIBUTION
64 #endif
66 return FALSE;
67}
#define TRUE
Definition: auxiliary.h:100
void dErrorBreak(void)
Definition: ap.h:40
STATIC_VAR BOOLEAN d_poly_error_reporting
Definition: pDebug.cc:42
void p_wrp(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:373
#define omPrintAddrInfo(A, B, C)
Definition: xalloc.h:270
#define omPrintCurrentBackTraceMax(A, B)
Definition: xalloc.h:265

◆ pGetCoeff()

static number & pGetCoeff ( poly  p)
inlinestatic

return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy

Definition at line 44 of file monomials.h.

45{
46 assume(p != NULL);
47 return p->coef;
48}
#define assume(x)
Definition: mod2.h:389