 |
My Project
debian-1:4.1.2-p1+ds-2
|
#include <stdarg.h>
#include <stdio.h>
#include "misc/auxiliary.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 203 of file pDebug.cc.
264 long c1, cc1, ccc1, ec1;
268 if (o->
data.syzcomp.Components!=
NULL)
270 cc1 = o->
data.syzcomp.Components[c1];
271 ccc1 = o->
data.syzcomp.ShiftedComponents[cc1];
273 else { cc1=0; ccc1=0; }
276 ec1 =
p->exp[o->
data.syzcomp.place];
308 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 39 of file pDebug.cc.
49 fprintf(stderr,
"\n// ***dPolyReportError: ");
50 vfprintf(stderr, fmt,
ap);
51 fprintf(stderr,
"\n occurred at\n");
55 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 186 of file pDebug.cc.
195 poly d_p =
p_Init(dest_ring);
197 assume(dest_ring->N == src_ring->N);
199 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 65 of file pDebug.cc.
73 #if (OM_TRACK > 0) && defined(OM_TRACK_CUSTOM)
74 void* custom = omGetCustomOfAddr(
p);
83 "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 151 of file p_polys.cc.
170 p->exp[o->
data.dp.place]=ord;
181 int *
w=o->
data.wp.weights;
183 for(
int i=a;
i<=e;
i++) ord+=((
unsigned long)
p_GetExp(
p,
i,r))*((
unsigned long)
w[
i-a]);
187 for(
int i=a;
i<=e;
i++)
197 p->exp[o->
data.wp.place]=ord;
203 const short a=o->
data.am.start;
204 const short e=o->
data.am.end;
205 const int *
w=o->
data.am.weights;
207 for(
short i=a;
i<=e;
i++,
w++)
212 for(
short i=a;
i<=e;
i++)
224 const short len_gen= o->
data.am.len_gen;
226 if ((c > 0) && (c <= len_gen))
233 p->exp[o->
data.am.place] = ord;
240 a=o->
data.wp64.start;
244 for(
int i=a;
i<=e;
i++)
251 if(ei!=0 && ai/ei!=wi)
255 Print(
"ai %lld, wi %lld\n",ai,wi);
257 Print(
"ai %ld, wi %ld\n",ai,wi);
265 Print(
"ai %lld, ord %lld\n",ai,ord);
267 Print(
"ai %ld, ord %ld\n",ai,ord);
272 long a_0=(long)(ord&mask);
273 long a_1=(long)(ord >>31 );
279 p->exp[o->
data.wp64.place]=a_1;
280 p->exp[o->
data.wp64.place+1]=a_0;
293 int pl=o->
data.cp.place;
302 o->
data.syzcomp.Components);
304 o->
data.syzcomp.ShiftedComponents);
305 if (ShiftedComponents !=
NULL)
308 assume(c == 0 || Components[c] != 0);
309 sc = ShiftedComponents[Components[c]];
310 assume(c == 0 || sc != 0);
312 p->exp[o->
data.syzcomp.place]=sc;
318 const short place = o->
data.syz.place;
319 const int limit = o->
data.syz.limit;
321 if (c > (
unsigned long)limit)
322 p->exp[place] = o->
data.syz.curr_index;
325 assume( (1 <= c) && (c <= (
unsigned long)limit) );
326 p->exp[place]= o->
data.syz.syz_index[c];
342 Print(
"p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);
p_wrp(
p, r);
351 const int*
const pVarOffset = o->
data.isTemp.pVarOffset;
356 for(
int i = 1;
i <= r->N;
i++ )
358 const int vo = pVarOffset[
i];
368 for(
int i = 1;
i <= r->N;
i++ )
370 const int vo = pVarOffset[
i];
390 Print(
"p_Setm_General: ro_is ord: pos: %d, p: ", pos);
p_wrp(
p, r);
399 const ideal F = o->
data.is.F;
400 const int limit = o->
data.is.limit;
402 const int start = o->
data.is.start;
404 if( F !=
NULL && c > limit )
408 Print(
"p_Setm_General: ro_is : in rSetm: pos: %d, c: %d > limit: %d\n", c, pos, limit);
409 PrintS(
"preComputed Values: ");
428 const poly
pp = F->m[c];
437 Print(
"Respective F[c - %d: %d] pp: ", limit, c);
442 const int end = o->
data.is.end;
450 Print(
"p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start,
p->exp[start]);
456 for(
int i = start;
i <= end;
i++)
457 p->exp[
i] +=
pp->exp[
i];
460 if (r->NegWeightL_Offset !=
NULL)
462 for (
int i=r->NegWeightL_Size-1;
i>=0;
i--)
464 const int _i = r->NegWeightL_Offset[
i];
465 if( start <= _i && _i <= end )
472 const int*
const pVarOffset = o->
data.is.pVarOffset;
476 for(
int i = 1;
i <= r->N;
i++ )
478 const int vo = pVarOffset[
i];
492 const int*
const pVarOffset = o->
data.is.pVarOffset;
497 const int vo = pVarOffset[0];
503 Print(
"ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo,
p->exp[vo]);
516 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 357 of file pDebug.cc.
378 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 380 of file pDebug.cc.
402 if (sev_1 & not_sev_2)
◆ pHaveCommonMonoms()
BOOLEAN pHaveCommonMonoms |
( |
poly |
p, |
|
|
poly |
q |
|
) |
| |
◆ pIsMonomOf()
BOOLEAN pIsMonomOf |
( |
poly |
p, |
|
|
poly |
m |
|
) |
| |
◆ pPrintDivisbleByStat()
void pPrintDivisbleByStat |
( |
| ) |
|
◆ d_poly_error_reporting
◆ pDivisibleBy_FALSE
◆ pDivisibleBy_number
◆ pDivisibleBy_ShortFalse
STATIC_VAR unsigned long pDivisibleBy_ShortFalse = 1 |
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 pHaveCommonMonoms(poly p, poly q)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
#define omPrintAddrInfo(A, B, C)
STATIC_VAR unsigned long pDivisibleBy_FALSE
#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 omPrintCurrentBackTraceMax(A, B)
#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)
STATIC_VAR int _componentsExternal
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)
BOOLEAN dPolyReportError(poly p, ring r, const char *fmt,...)
#define pFalseReturn(cond)
#define pAssumeReturn(cond)
STATIC_VAR long * _componentsShifted
STATIC_VAR BOOLEAN d_poly_error_reporting
static poly p_Init(const ring r, omBin bin)
static int p_LmCmp(poly p, poly q, const ring r)
STATIC_VAR unsigned long pDivisibleBy_number
BOOLEAN pIsMonomOf(poly p, poly m)
BOOLEAN p_CheckRing(ring r)
static void p_LmFree(poly p, ring)
#define omTestList(ptr, level)
#define _pPolyAssumeReturn(cond, p, r)
#define omSizeWOfBin(bin_ptr)
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)
#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)
#define omTestBinAddrSize(A, B, C)
BOOLEAN _p_Test(poly p, ring r, int level)
STATIC_VAR int * _components