My Project  debian-1:4.1.2-p1+ds-2
Functions
pShallowCopyDelete.cc File Reference
#include "misc/auxiliary.h"
#include "pShallowCopyDelete.h"

Go to the source code of this file.

Functions

poly pShallowCopyDelete_General (poly s_p, ring s_r, ring d_r, omBin d_bin)
 
pShallowCopyDeleteProc pGetShallowCopyDeleteProc (ring, ring)
 

Function Documentation

◆ pGetShallowCopyDeleteProc()

pShallowCopyDeleteProc pGetShallowCopyDeleteProc ( ring  ,
ring   
)

Definition at line 48 of file pShallowCopyDelete.cc.

51 {

◆ pShallowCopyDelete_General()

poly pShallowCopyDelete_General ( poly  s_p,
ring  s_r,
ring  d_r,
omBin  d_bin 
)

Definition at line 14 of file pShallowCopyDelete.cc.

17 {
18  p_CheckPolyRing(s_p, s_r);
19  p_CheckRing(d_r);
20  assume(d_bin != NULL);
21  assume(d_bin == d_r->PolyBin || omSizeWOfBin(d_bin) == omSizeWOfBin(d_r->PolyBin));
22  assume(s_r->N == d_r->N);
23 
24  spolyrec dp;
25  poly d_p = &dp;
26  int N = d_r->N;
27  int i;
28 
29 
30  while (s_p != NULL)
31  {
32  d_p->next = p_Init(d_r, d_bin);
33  pIter(d_p);
34 
35  pSetCoeff0(d_p, pGetCoeff(s_p));
36  for (i=1; i<= N; i++)
37  p_SetExp(d_p, i, p_GetExp(s_p, i, s_r), d_r);
38 
39  if (rRing_has_Comp(d_r))
40  p_SetComp(d_p, p_GetComp(s_p, s_r), d_r);
41  p_Setm(d_p, d_r);
42 
43  s_p = p_LmFreeAndNext(s_p, s_r);
44  }
45  pNext(d_p) = NULL;
46 
p_LmFreeAndNext
static poly p_LmFreeAndNext(poly p, ring)
Definition: p_polys.h:689
p_GetComp
#define p_GetComp(p, r)
Definition: monomials.h:61
p_GetExp
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
Definition: p_polys.h:456
N
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:48
p_SetExp
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
Definition: p_polys.h:475
i
int i
Definition: cfEzgcd.cc:125
pIter
#define pIter(p)
Definition: monomials.h:34
spolyrec
Definition: monomials.h:20
p_Init
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1242
p_CheckRing
BOOLEAN p_CheckRing(ring r)
Definition: pDebug.cc:122
p_CheckPolyRing
BOOLEAN p_CheckPolyRing(poly p, ring r)
Definition: pDebug.cc:106
rRing_has_Comp
#define rRing_has_Comp(r)
Definition: monomials.h:258
omSizeWOfBin
#define omSizeWOfBin(bin_ptr)
Definition: omAllocPrivate.h:96
pSetCoeff0
#define pSetCoeff0(p, n)
Definition: monomials.h:56
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:11
p_SetComp
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:237
p_Setm
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:223
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:41
pNext
#define pNext(p)
Definition: monomials.h:33