My Project
shiftgb.cc
Go to the documentation of this file.
1 /****************************************
2 * Computer Algebra System SINGULAR *
3 ****************************************/
4 /*
5 * ABSTRACT: kernel: utils for shift GB and free GB
6 */
7 
8 #include "kernel/mod2.h"
9 
10 #ifdef HAVE_SHIFTBBA
11 #include "polys/monomials/ring.h"
12 #include "kernel/polys.h"
13 #include "coeffs/numbers.h"
14 #include "kernel/ideals.h"
15 #include "polys/matpol.h"
16 #include "polys/kbuckets.h"
17 #include "kernel/GBEngine/kstd1.h"
18 #include "polys/sbuckets.h"
20 #include "kernel/GBEngine/kutil.h"
21 #include "kernel/structs.h"
22 #include "kernel/GBEngine/khstd.h"
23 #include "polys/kbuckets.h"
24 #include "polys/weight.h"
25 #include "misc/intvec.h"
26 #include "kernel/structs.h"
29 #include "polys/weight.h"
30 #include "misc/intvec.h"
32 #include "polys/nc/sca.h"
33 #include "polys/shiftop.h"
34 
35 poly p_LPCopyAndShiftLM(poly p, int sh, const ring r)
36 {
37  if (sh == 0 || p == NULL) return p;
38 
39  poly q = p_Head(p, r);
40  p_mLPshift(q, sh, r);
41  pNext(q) = pNext(p);
42  return q;
43 }
44 
45 int p_mLPmaxPossibleShift(poly p, const ring r)
46 {
47  int lastBlock = p_mLastVblock(p, r);
48  if (lastBlock == 0) return 0;
49  int uptodeg = r->N/r->isLPring;
50  return uptodeg - lastBlock;
51 }
52 
53 #endif
int p
Definition: cfModGcd.cc:4080
#define pNext(p)
Definition: monomials.h:36
#define NULL
Definition: omList.c:12
static poly p_Head(poly p, const ring r)
copy the i(leading) term of p
Definition: p_polys.h:826
Compatiblity layer for legacy polynomial operations (over currRing)
poly p_LPCopyAndShiftLM(poly p, int sh, const ring r)
Definition: shiftgb.cc:35
int p_mLPmaxPossibleShift(poly p, const ring r)
Definition: shiftgb.cc:45
int p_mLastVblock(poly p, const ring ri)
Definition: shiftop.cc:418
void p_mLPshift(poly m, int sh, const ring ri)
Definition: shiftop.cc:359