 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
#include <stdarg.h>
#include <stdio.h>
#include "misc/auxiliary.h"
#include "omalloc/omalloc.h"
#include "polys/monomials/ring.h"
#include "polys/monomials/p_polys.h"
#include "coeffs/coeffs.h"
Go to the source code of this file.
|
BOOLEAN | dPolyReportError (poly p, ring r, const char *fmt,...) |
|
BOOLEAN | p_LmCheckIsFromRing (poly p, ring r) |
|
BOOLEAN | p_CheckIsFromRing (poly p, ring r) |
|
BOOLEAN | p_CheckPolyRing (poly p, ring r) |
|
BOOLEAN | p_LmCheckPolyRing (poly p, ring r) |
|
BOOLEAN | p_CheckRing (ring r) |
|
BOOLEAN | p_DebugLmDivisibleByNoComp (poly a, poly b, ring r) |
|
BOOLEAN | pIsMonomOf (poly p, poly m) |
|
BOOLEAN | pHaveCommonMonoms (poly p, poly q) |
|
void | p_Setm_General (poly p, ring r) |
|
static poly | p_DebugInit (poly p, ring src_ring, ring dest_ring) |
|
BOOLEAN | _p_Test (poly p, ring r, int level) |
|
BOOLEAN | _p_LmTest (poly p, ring r, int level) |
|
BOOLEAN | _pp_Test (poly p, ring lmRing, ring tailRing, int level) |
|
BOOLEAN | pDebugLmShortDivisibleBy (poly p1, unsigned long sev_1, ring r_1, poly p2, unsigned long not_sev_2, ring r_2) |
|
BOOLEAN | pDebugLmShortDivisibleByNoComp (poly p1, unsigned long sev_1, ring r_1, poly p2, unsigned long not_sev_2, ring r_2) |
|
void | pPrintDivisbleByStat () |
|
◆ PDEBUG_CC
◆ _p_LmTest()
BOOLEAN _p_LmTest |
( |
poly |
p, |
|
|
ring |
r, |
|
|
int |
level |
|
) |
| |
◆ _p_Test()
BOOLEAN _p_Test |
( |
poly |
p, |
|
|
ring |
r, |
|
|
int |
level |
|
) |
| |
Definition at line 212 of file pDebug.cc.
266 long c1, cc1, ccc1, ec1;
270 if (o->
data.syzcomp.Components!=
NULL)
272 cc1 = o->
data.syzcomp.Components[c1];
273 ccc1 = o->
data.syzcomp.ShiftedComponents[cc1];
275 else { cc1=0; ccc1=0; }
278 ec1 =
p->exp[o->
data.syzcomp.place];
310 for (
i=r->N;
i>0;
i--)
◆ _pp_Test()
BOOLEAN _pp_Test |
( |
poly |
p, |
|
|
ring |
lmRing, |
|
|
ring |
tailRing, |
|
|
int |
level |
|
) |
| |
◆ dPolyReportError()
BOOLEAN dPolyReportError |
( |
poly |
p, |
|
|
ring |
r, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 44 of file pDebug.cc.
51 fprintf(stderr,
"\n// ***dPolyReportError: ");
52 vfprintf(stderr, fmt,
ap);
53 fprintf(stderr,
"\n occurred at\n");
57 fprintf(stderr,
" occurred for poly: ");
◆ p_CheckIsFromRing()
BOOLEAN p_CheckIsFromRing |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
◆ p_CheckPolyRing()
BOOLEAN p_CheckPolyRing |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
◆ p_CheckRing()
◆ p_DebugInit()
static poly p_DebugInit |
( |
poly |
p, |
|
|
ring |
src_ring, |
|
|
ring |
dest_ring |
|
) |
| |
|
static |
Definition at line 195 of file pDebug.cc.
197 poly d_p =
p_Init(dest_ring);
199 assume(dest_ring->N == src_ring->N);
201 for (
i=1;
i<= src_ring->N;
i++)
◆ p_DebugLmDivisibleByNoComp()
BOOLEAN p_DebugLmDivisibleByNoComp |
( |
poly |
a, |
|
|
poly |
b, |
|
|
ring |
r |
|
) |
| |
◆ p_LmCheckIsFromRing()
BOOLEAN p_LmCheckIsFromRing |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
Definition at line 71 of file pDebug.cc.
75 #if (OM_TRACK > 0) && defined(OM_TRACK_CUSTOM)
76 void* custom = omGetCustomOfAddr(
p);
85 "monomial not from specified ring",
p,r);
◆ p_LmCheckPolyRing()
BOOLEAN p_LmCheckPolyRing |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
◆ p_Setm_General()
void p_Setm_General |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
!!!????? where?????
Definition at line 154 of file p_polys.cc.
172 p->exp[o->
data.dp.place]=ord;
183 int *
w=o->
data.wp.weights;
185 for(
int i=a;
i<=e;
i++) ord+=((
unsigned long)
p_GetExp(
p,
i,r))*((
unsigned long)
w[
i-a]);
189 for(
int i=a;
i<=e;
i++)
199 p->exp[o->
data.wp.place]=ord;
205 const short a=o->
data.am.start;
206 const short e=o->
data.am.end;
207 const int *
w=o->
data.am.weights;
209 for(
short i=a;
i<=e;
i++,
w++)
214 for(
short i=a;
i<=e;
i++)
226 const short len_gen= o->
data.am.len_gen;
228 if ((c > 0) && (c <= len_gen))
235 p->exp[o->
data.am.place] = ord;
242 a=o->
data.wp64.start;
246 for(
int i=a;
i<=e;
i++)
253 if(ei!=0 && ai/ei!=wi)
257 Print(
"ai %lld, wi %lld\n",ai,wi);
259 Print(
"ai %ld, wi %ld\n",ai,wi);
267 Print(
"ai %lld, ord %lld\n",ai,ord);
269 Print(
"ai %ld, ord %ld\n",ai,ord);
274 long a_0=(long)(ord&mask);
275 long a_1=(long)(ord >>31 );
281 p->exp[o->
data.wp64.place]=a_1;
282 p->exp[o->
data.wp64.place+1]=a_0;
295 int pl=o->
data.cp.place;
304 o->
data.syzcomp.Components);
306 o->
data.syzcomp.ShiftedComponents);
307 if (ShiftedComponents !=
NULL)
310 assume(c == 0 || Components[c] != 0);
311 sc = ShiftedComponents[Components[c]];
312 assume(c == 0 || sc != 0);
314 p->exp[o->
data.syzcomp.place]=sc;
320 const short place = o->
data.syz.place;
321 const int limit = o->
data.syz.limit;
323 if (c > (
unsigned long)limit)
324 p->exp[place] = o->
data.syz.curr_index;
327 assume( (1 <= c) && (c <= (
unsigned long)limit) );
328 p->exp[place]= o->
data.syz.syz_index[c];
344 Print(
"p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);
p_wrp(
p, r);
353 const int*
const pVarOffset = o->
data.isTemp.pVarOffset;
358 for(
int i = 1;
i <= r->N;
i++ )
360 const int vo = pVarOffset[
i];
370 for(
int i = 1;
i <= r->N;
i++ )
372 const int vo = pVarOffset[
i];
392 Print(
"p_Setm_General: ro_is ord: pos: %d, p: ", pos);
p_wrp(
p, r);
401 const ideal F = o->
data.is.F;
402 const int limit = o->
data.is.limit;
404 const int start = o->
data.is.start;
406 if( F !=
NULL && c > limit )
410 Print(
"p_Setm_General: ro_is : in rSetm: pos: %d, c: %d > limit: %d\n", c, pos, limit);
411 PrintS(
"preComputed Values: ");
430 const poly
pp = F->m[c];
439 Print(
"Respective F[c - %d: %d] pp: ", limit, c);
444 const int end = o->
data.is.end;
452 Print(
"p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start,
p->exp[start]);
458 for(
int i = start;
i <= end;
i++)
459 p->exp[
i] +=
pp->exp[
i];
462 if (r->NegWeightL_Offset !=
NULL)
464 for (
int i=r->NegWeightL_Size-1;
i>=0;
i--)
466 const int _i = r->NegWeightL_Offset[
i];
467 if( start <= _i && _i <= end )
474 const int*
const pVarOffset = o->
data.is.pVarOffset;
478 for(
int i = 1;
i <= r->N;
i++ )
480 const int vo = pVarOffset[
i];
494 const int*
const pVarOffset = o->
data.is.pVarOffset;
499 const int vo = pVarOffset[0];
505 Print(
"ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo,
p->exp[vo]);
518 if (pos == r->OrdSize)
return;
◆ pDebugLmShortDivisibleBy()
BOOLEAN pDebugLmShortDivisibleBy |
( |
poly |
p1, |
|
|
unsigned long |
sev_1, |
|
|
ring |
r_1, |
|
|
poly |
p2, |
|
|
unsigned long |
not_sev_2, |
|
|
ring |
r_2 |
|
) |
| |
Definition at line 366 of file pDebug.cc.
380 if (sev_1 & not_sev_2)
◆ pDebugLmShortDivisibleByNoComp()
BOOLEAN pDebugLmShortDivisibleByNoComp |
( |
poly |
p1, |
|
|
unsigned long |
sev_1, |
|
|
ring |
r_1, |
|
|
poly |
p2, |
|
|
unsigned long |
not_sev_2, |
|
|
ring |
r_2 |
|
) |
| |
Definition at line 389 of file pDebug.cc.
404 if (sev_1 & not_sev_2)
◆ pHaveCommonMonoms()
BOOLEAN pHaveCommonMonoms |
( |
poly |
p, |
|
|
poly |
q |
|
) |
| |
◆ pIsMonomOf()
BOOLEAN pIsMonomOf |
( |
poly |
p, |
|
|
poly |
m |
|
) |
| |
◆ pPrintDivisbleByStat()
void pPrintDivisbleByStat |
( |
| ) |
|
Definition at line 413 of file pDebug.cc.
415 Print(
"#Tests: %ld; #FALSE %ld(%ld); #SHORT %ld(%ld)\n",
◆ d_poly_error_reporting
◆ pDivisibleBy_FALSE
unsigned long pDivisibleBy_FALSE = 1 |
|
static |
◆ pDivisibleBy_number
unsigned long pDivisibleBy_number = 1 |
|
static |
◆ pDivisibleBy_ShortFalse
unsigned long pDivisibleBy_ShortFalse = 1 |
|
static |
int dReportError(const char *fmt,...)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static poly p_DebugInit(poly p, ring src_ring, ring dest_ring)
BOOLEAN p_CheckIsFromRing(poly p, ring r)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
static unsigned long pDivisibleBy_FALSE
void p_Setm_General(poly p, ring r)
static unsigned long pDivisibleBy_number
#define __p_GetComp(p, r)
void p_wrp(poly p, ring lmRing, ring tailRing)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
#define POLY_NEGWEIGHT_OFFSET
#define _pPolyAssume(cond, p, r)
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
BOOLEAN _p_LmTest(poly p, ring r, int level)
BOOLEAN p_LmCheckIsFromRing(poly p, ring r)
#define omIsBinPageAddr(addr)
#define pPolyAssumeReturnMsg(cond, msg)
#define _pPolyAssumeReturnMsg(cond, msg, p, r)
void PrintS(const char *s)
size_t omSizeWOfAddr(void *addr)
omError_t omTestBinAddrSize(void *addr, size_t size, int check_level)
BOOLEAN dPolyReportError(poly p, ring r, const char *fmt,...)
static BOOLEAN d_poly_error_reporting
#define pFalseReturn(cond)
#define pAssumeReturn(cond)
static poly p_Init(const ring r, omBin bin)
static int p_LmCmp(poly p, poly q, const ring r)
BOOLEAN pIsMonomOf(poly p, poly m)
BOOLEAN p_CheckRing(ring r)
static void p_LmFree(poly p, ring)
#define omTestList(ptr, level)
#define rRing_has_Comp(r)
#define _pPolyAssumeReturn(cond, p, r)
static unsigned long pDivisibleBy_ShortFalse
#define omSizeWOfBin(bin_ptr)
static int _componentsExternal
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static long * _componentsShifted
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
static BOOLEAN p_ExpVectorEqual(poly p1, poly p2, const ring r1, const ring r2)
int omPrintCurrentBackTraceMax(FILE *fd, int max)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
unsigned long p_GetShortExpVector(const poly p, const ring r)
static BOOLEAN p_LmDivisibleByNoComp(poly a, poly b, const ring r)
BOOLEAN _p_Test(poly p, ring r, int level)
void omPrintAddrInfo(FILE *fd, void *addr, const char *s)