Functions
shiftgb.cc File Reference
#include "kernel/mod2.h"
#include "polys/monomials/ring.h"
#include "kernel/polys.h"
#include "coeffs/numbers.h"
#include "kernel/ideals.h"
#include "polys/matpol.h"
#include "polys/kbuckets.h"
#include "kernel/GBEngine/kstd1.h"
#include "polys/sbuckets.h"
#include "polys/operations/p_Mult_q.h"
#include "kernel/GBEngine/kutil.h"
#include "kernel/structs.h"
#include "kernel/GBEngine/khstd.h"
#include "polys/weight.h"
#include "misc/intvec.h"
#include "kernel/GBEngine/kInline.h"
#include "kernel/combinatorics/stairc.h"
#include "kernel/GBEngine/shiftgb.h"
#include "polys/nc/sca.h"
#include "polys/shiftop.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ itoInsert()

int itoInsert ( poly  p,
const ring  r 
)

Definition at line 46 of file shiftgb.cc.

47 {
48  /* the below situation (commented out) might happen! */
49 // if (r == currRing)
50 // {
51 // "Current ring is not expected in toInsert";
52 // return(0);
53 // }
54  /* compute the number of insertions */
55  int i = p_mLastVblock(p, currRing);
56  if (pNext(p) != NULL)
57  {
58  i = si_max(i, p_LastVblock(pNext(p), r) );
59  }
60  // i = uptodeg - i +1;
61  int uptodeg = r->N/r->isLPring;
62  // p_wrp(p,currRing,r); Print("----i:%d",i); PrintLn();
63  return uptodeg - i;
64 }
int p_mLastVblock(poly p, const ring ri)
Definition: shiftop.cc:412
static int si_max(const int a, const int b)
Definition: auxiliary.h:138
int p_LastVblock(poly p, const ring r)
Definition: shiftop.cc:397
int i
Definition: cfEzgcd.cc:125
#define NULL
Definition: omList.c:12
#define pNext(p)
Definition: monomials.h:36
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
int p
Definition: cfModGcd.cc:4019

◆ 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 }
static poly p_Head(poly p, const ring r)
Definition: p_polys.h:824
#define NULL
Definition: omList.c:12
#define pNext(p)
Definition: monomials.h:36
int p
Definition: cfModGcd.cc:4019
void p_mLPshift(poly m, int sh, const ring ri)
Definition: shiftop.cc:357