My Project
Loading...
Searching...
No Matches
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  source_r,
ring  dest_r 
)

Definition at line 50 of file pShallowCopyDelete.cc.

51{
53}
poly pShallowCopyDelete_General(poly s_p, ring s_r, ring d_r, omBin d_bin)

◆ pShallowCopyDelete_General()

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

Definition at line 16 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
47 return dp.next;
48}
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:56
int i
Definition: cfEzgcd.cc:132
#define assume(x)
Definition: mod2.h:389
#define p_GetComp(p, r)
Definition: monomials.h:64
poly next
Definition: monomials.h:24
#define pIter(p)
Definition: monomials.h:37
#define pNext(p)
Definition: monomials.h:36
#define pSetCoeff0(p, n)
Definition: monomials.h:59
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:44
#define rRing_has_Comp(r)
Definition: monomials.h:266
#define omSizeWOfBin(bin_ptr)
#define NULL
Definition: omList.c:12
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:486
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:245
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:231
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:467
BOOLEAN p_CheckRing(ring r)
Definition: pDebug.cc:131
BOOLEAN p_CheckPolyRing(poly p, ring r)
Definition: pDebug.cc:115
static poly p_LmFreeAndNext(poly p, ring)
Definition: p_polys.h:709
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1318