My Project
Loading...
Searching...
No Matches
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)
 
#define pIter(p)
 
#define p_GetCoeff(p, r)
 
#define pSetCoeff0(p, n)
 
#define p_SetCoeff0(p, n, r)
 
#define __p_GetComp(p, r)
 
#define p_GetComp(p, r)
 
#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)
 
#define pPolyAssumeReturn(cond)
 
#define pPolyAssumeReturnMsg(cond, msg)
 
#define pFalseReturn(cond)
 
#define p_SetRingOfLm(p, r)
 
#define pAssume1(cond)
 
#define pPolyAssume1(cond)
 
#define _pPolyAssume1(cond, p, r)
 
#define pAssumeReturn1(cond)
 
#define pPolyAssumeReturn1(cond)
 
#define _pPolyAssumeReturn1(cond, p, r)
 
#define p_LmCheckPolyRing1(p, r)
 
#define p_CheckRing1(r)
 
#define pIfThen1(cond, check)
 
#define pAssume2(cond)
 
#define pPolyAssume2(cond)
 
#define _pPolyAssume2(cond, p, r)
 
#define pAssumeReturn2(cond)
 
#define pPolyAssumeReturn2(cond)
 
#define _pPolyAssumeReturn2(cond, p, r)
 
#define p_LmCheckPolyRing2(p, r)
 
#define p_CheckRing2(r)
 
#define pIfThen2(cond, check)
 
#define p_AllocBin(p, bin, r)
 
#define p_FreeBinAddr(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)
 
#define rRing_has_Comp(r)
 

Functions

static number & pGetCoeff (poly p)
 return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
 
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,
r )
Value:
(p)->exp[r->pCompIndex]
int p
Definition cfModGcd.cc:4086
gmp_float exp(const gmp_float &a)

Definition at line 63 of file monomials.h.

◆ _pPolyAssume

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

Definition at line 113 of file monomials.h.

113#define _pPolyAssume(cond,p,r) \
114do \
115{ \
116 if (! (cond)) \
117 { \
118 dPolyReportError(p, r, "pPolyAssume violation of: %s", \
119 #cond); \
120 } \
121} \
122while (0)

◆ _pPolyAssume1

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

Definition at line 173 of file monomials.h.

◆ _pPolyAssume2

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

Definition at line 195 of file monomials.h.

◆ _pPolyAssumeReturn

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

Definition at line 101 of file monomials.h.

101#define _pPolyAssumeReturn(cond, p, r) \
102do \
103{ \
104 if (! (cond)) \
105 { \
106 dPolyReportError(p, r, "pPolyAssume violation of: %s", \
107 #cond); \
108 return FALSE; \
109 } \
110} \
111while (0)

◆ _pPolyAssumeReturn1

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

Definition at line 176 of file monomials.h.

◆ _pPolyAssumeReturn2

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

Definition at line 198 of file monomials.h.

◆ _pPolyAssumeReturnMsg

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

Definition at line 124 of file monomials.h.

124#define _pPolyAssumeReturnMsg(cond, msg, p, r) \
125do \
126{ \
127 if (! (cond)) \
128 { \
129 dPolyReportError(p, r, "%s ", msg); \
130 return FALSE; \
131 } \
132} \
133while (0)

◆ p_AllocBin [1/2]

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

Definition at line 210 of file monomials.h.

210#define p_AllocBin(p, bin, r) \
211do \
212{ \
213 omTypeAllocBin(poly, p, bin); \
214 p_SetRingOfLm(p, r); \
215} \
216while (0)

◆ p_AllocBin [2/2]

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

Definition at line 210 of file monomials.h.

210#define p_AllocBin(p, bin, r) \
211do \
212{ \
213 omTypeAllocBin(poly, p, bin); \
214 p_SetRingOfLm(p, r); \
215} \
216while (0)

◆ p_CheckRing1

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

Definition at line 178 of file monomials.h.

◆ p_CheckRing2

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

Definition at line 200 of file monomials.h.

◆ p_FreeBinAddr [1/2]

#define p_FreeBinAddr ( p,
r )
Value:
static void p_LmFree(poly p, ring)
Definition p_polys.h:685

Definition at line 217 of file monomials.h.

◆ p_FreeBinAddr [2/2]

#define p_FreeBinAddr ( p,
r )
Value:

Definition at line 217 of file monomials.h.

◆ p_GetCoeff

#define p_GetCoeff ( p,
r )
Value:
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44

Definition at line 50 of file monomials.h.

◆ p_GetComp

#define p_GetComp ( p,
r )
Value:
((long) (r->pCompIndex >= 0 ? __p_GetComp(p, r) : 0))
#define __p_GetComp(p, r)
Definition monomials.h:63

Definition at line 64 of file monomials.h.

◆ p_LmCheckPolyRing1

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

Definition at line 177 of file monomials.h.

◆ p_LmCheckPolyRing2

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

Definition at line 199 of file monomials.h.

◆ p_SetCoeff0

#define p_SetCoeff0 ( p,
n,
r )
Value:
#define pSetCoeff0(p, n)
Definition monomials.h:59

Definition at line 60 of file monomials.h.

◆ p_SetRingOfLm

#define p_SetRingOfLm ( p,
r )
Value:
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.

90#define pAssume(cond) \
91do \
92{ \
93 if (! (cond)) \
94 { \
95 dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
96 #cond); \
97 } \
98} \
99while (0)

◆ pAssume1

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

Definition at line 171 of file monomials.h.

◆ pAssume2

#define pAssume2 ( cond)
Value:
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.

78#define pAssumeReturn(cond) \
79do \
80{ \
81 if (! (cond)) \
82 { \
83 dPolyReportError(NULL, NULL, "pAssume violation of: %s", \
84 #cond); \
85 return FALSE; \
86 } \
87} \
88while (0)

◆ pAssumeReturn1

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

Definition at line 174 of file monomials.h.

◆ pAssumeReturn2

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

Definition at line 196 of file monomials.h.

◆ pFalseReturn

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

Definition at line 139 of file monomials.h.

◆ pIfThen1

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

Definition at line 179 of file monomials.h.

◆ pIfThen2

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

Definition at line 201 of file monomials.h.

◆ pIter

#define pIter ( p)
Value:
(void)((p) = (p)->next)
ListNode * next
Definition janet.h:31

Definition at line 37 of file monomials.h.

◆ pNext

#define pNext ( p)
Value:
((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)
Value:
_pPolyAssume(cond, p, r)
#define _pPolyAssume(cond, p, r)
Definition monomials.h:113

Definition at line 135 of file monomials.h.

◆ pPolyAssume1

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

Definition at line 172 of file monomials.h.

◆ pPolyAssume2

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

Definition at line 194 of file monomials.h.

◆ pPolyAssumeReturn

#define pPolyAssumeReturn ( cond)
Value:
#define _pPolyAssumeReturn(cond, p, r)
Definition monomials.h:101

Definition at line 136 of file monomials.h.

◆ pPolyAssumeReturn1

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

Definition at line 175 of file monomials.h.

◆ pPolyAssumeReturn2

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

Definition at line 197 of file monomials.h.

◆ pPolyAssumeReturnMsg

#define pPolyAssumeReturnMsg ( cond,
msg )
Value:
_pPolyAssumeReturnMsg(cond, msg, p, r)
#define _pPolyAssumeReturnMsg(cond, msg, p, r)
Definition monomials.h:124

Definition at line 137 of file monomials.h.

◆ pSetCoeff0

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

Definition at line 59 of file monomials.h.

◆ rRing_has_Comp

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

Definition at line 266 of file monomials.h.

Function Documentation

◆ dPolyReportError()

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

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:101
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