My Project
Loading...
Searching...
No Matches
Macros | Functions
shiftgb.h File Reference
#include "kernel/structs.h"
#include "polys/nc/nc.h"

Go to the source code of this file.

Macros

#define pLPCopyAndShiftLM(p, sh)   p_LPCopyAndShiftLM(p, sh, currRing)
 
#define pmLPmaxPossibleShift(p)   p_mLPmaxPossibleShift(p, currRing)
 

Functions

poly p_LPCopyAndShiftLM (poly p, int sh, const ring r)
 
int p_mLPmaxPossibleShift (poly p, const ring r)
 

Macro Definition Documentation

◆ pLPCopyAndShiftLM

#define pLPCopyAndShiftLM (   p,
  sh 
)    p_LPCopyAndShiftLM(p, sh, currRing)

Definition at line 15 of file shiftgb.h.

◆ pmLPmaxPossibleShift

#define pmLPmaxPossibleShift (   p)    p_mLPmaxPossibleShift(p, currRing)

Definition at line 18 of file shiftgb.h.

Function Documentation

◆ p_LPCopyAndShiftLM()

poly p_LPCopyAndShiftLM ( poly  p,
int  sh,
const ring  r 
)

Definition at line 35 of file shiftgb.cc.

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}
int p
Definition: cfModGcd.cc:4078
#define pNext(p)
Definition: monomials.h:36
#define NULL
Definition: omList.c:12
static poly p_Head(const poly p, const ring r)
copy the (leading) term of p
Definition: p_polys.h:858
void p_mLPshift(poly m, int sh, const ring ri)
Definition: shiftop.cc:362

◆ p_mLPmaxPossibleShift()

int p_mLPmaxPossibleShift ( poly  p,
const ring  r 
)

Definition at line 45 of file shiftgb.cc.

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}
int p_mLastVblock(poly p, const ring ri)
Definition: shiftop.cc:421