31#include "polys/prCopy.inc"
38 res = pr_Copy_NoREqual_NSimple_Sort(
p, src_r, dest_r);
40 res = pr_Copy_NoREqual_NoNSimple_Sort(
p, src_r, dest_r);
48 int _min =
si_min(dest_r->N, src_r->N);
71 dest =
pNext(&dest_s);
81 res = pr_Copy_NoREqual_NSimple_NoSort(
p, src_r, dest_r);
83 res = pr_Copy_NoREqual_NoNSimple_NoSort(
p, src_r, dest_r);
94 res = pr_Move_NoREqual_NSimple_Sort(
p, src_r, dest_r);
96 res = pr_Move_NoREqual_NoNSimple_Sort(
p, src_r, dest_r);
105 res = pr_Move_NoREqual_NSimple_NoSort(
p, src_r, dest_r);
107 res = pr_Move_NoREqual_NoNSimple_NoSort(
p, src_r, dest_r);
114 return pr_Copy_NoREqual_NSimple_NoSort(
p, r, dest_r);
119 return pr_Copy_NoREqual_NSimple_Sort(
p, r, dest_r);
129 poly tail,
head, q =
p;
132 head = prproc(q, src_r, dest_r);
145 prproc = pr_Copy_NoREqual_NSimple_NoSort;
147 prproc = pr_Copy_NoREqual_NoNSimple_NoSort;
149 const poly
res =
prHeadR(
p, src_r, dest_r, prproc);
160 prCopyProc_t prproc = pr_Copy_NoREqual_NoNSimple_NoSort;
162 prproc = pr_Copy_NoREqual_NSimple_NoSort;
167 for (
int i =
N - 1;
i >= 0;
i--)
178 assume(src_r->cf==dest_r->cf);
186 res->m[
i] = prproc(
p, src_r, dest_r);
194 assume(src_r->cf==dest_r->cf);
198 prproc = pr_Copy_NoREqual_NSimple_Sort;
200 prproc = pr_Copy_NoREqual_NoNSimple_Sort;
207 assume(src_r->cf==dest_r->cf);
211 prproc = pr_Copy_NoREqual_NSimple_NoSort;
213 prproc = pr_Copy_NoREqual_NoNSimple_NoSort;
222 return idrCopy(
id, src_r, dest_r, pr_Copy_NoREqual_NSimple_Sort);
227 return idrCopy(
id, src_r, dest_r, pr_Copy_NoREqual_NSimple_NoSort);
235 assume(src_r->cf==dest_r->cf);
243 res->m[
i] = prproc(
res->m[
i], src_r, dest_r);
250 assume(src_r->cf==dest_r->cf);
254 prproc = pr_Move_NoREqual_NSimple_Sort;
256 prproc = pr_Move_NoREqual_NoNSimple_Sort;
263 assume(src_r->cf==dest_r->cf);
267 prproc = pr_Move_NoREqual_NSimple_NoSort;
269 prproc = pr_Move_NoREqual_NoNSimple_NoSort;
static int si_min(const int a, const int b)
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static int max(int a, int b)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define rRing_has_Comp(r)
static void p_LmDelete(poly p, const ring r)
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
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static void p_Setm(poly p, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static poly p_Init(const ring r, omBin bin)
static poly p_SortAdd(poly p, const ring r, BOOLEAN revert=FALSE)
poly prMoveR(poly &p, ring src_r, ring dest_r)
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
poly prHeadR(poly p, ring src_r, ring dest_r, prCopyProc_t prproc)
poly prMapR(poly src, nMapFunc nMap, ring src_r, ring dest_r)
static void prCopyEvector(poly dest, ring dest_r, poly src, ring src_r, int max)
ideal idrShallowCopyR_NoSort(ideal id, ring src_r, ring dest_r)
poly prCopyR(poly p, ring src_r, ring dest_r)
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
poly prShallowCopyR(poly p, ring r, ring dest_r)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
static ideal idrMove(ideal &id, ring src_r, ring dest_r, prCopyProc_t prproc)
static ideal idrCopy(ideal id, ring src_r, ring dest_r, prCopyProc_t prproc)
poly prMoveR_NoSort(poly &p, ring src_r, ring dest_r)
poly prCopyR_NoSort(poly p, ring src_r, ring dest_r)
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
ideal idrHeadR(ideal id, ring r, ring dest_r)
Copy leading terms of id[i] via prHeeadR into dest_r.
ideal idrShallowCopyR(ideal id, ring src_r, ring dest_r)
poly(* prCopyProc_t)(poly &src_p, ring src_r, ring dest_r)
poly prShallowCopyR_NoSort(poly p, ring r, ring dest_r)
static BOOLEAN rField_has_simple_Alloc(const ring r)
Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies.
ideal idInit(int idsize, int rank)
initialise an ideal / module