TODO: there might be extreme cases where this doesn't hold...
65 ring sourcering = dst_r;
72 Werror(
"Sorry, not yet implemented for noncomm. rings");
83 int imagepvariables =
rVar(theImageRing);
84 int N =
rVar(dst_r)+imagepvariables;
89 WerrorS(
"error in rSumInternal");
95 if (theImageRing->cf != dst_r->cf)
98 Werror(
"Coefficient fields/rings must be equal");
109 if (theImageRing->qideal!=
NULL) j+=
IDELEMS(theImageRing->qideal);
110 temp1 =
idInit(sourcering->N+j,1);
111 for (i=0;i<sourcering->N;i++)
114 p_SetExp(q,i+1+imagepvariables,1,tmpR);
130 for (i=sourcering->N;i<sourcering->N+j0;i++)
133 pChangeSizeOfPoly(theImageRing, id->m[i-sourcering->N], 1, imagepvariables, tmpR),
136 for (i=sourcering->N+j0;i<sourcering->N+j;i++)
139 pChangeSizeOfPoly(theImageRing, theImageRing->qideal->m[i-sourcering->N-j0], 1, imagepvariables, tmpR),
static poly p_SortMerge(poly p, const ring r, BOOLEAN revert=FALSE)
int rSumInternal(ring r1, ring r2, ring &sum, BOOLEAN vartest, BOOLEAN dp_dp)
returns -1 for not compatible, 1 for compatible (and sum) dp_dp:0: block ordering, 1: dp,dp, 2: aa(...),dp vartest: check for name conflicts
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
void WerrorS(const char *s)
static bool rIsPluralRing(const ring r)
we must always have this test!
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
const CanonicalForm CFMap CFMap & N
static poly pChangeSizeOfPoly(ring p_ring, poly p, int minvar, int maxvar, const ring dst_r)
int p_LowVar(poly p, const ring r)
the minimal index of used variables - 1
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void rChangeCurrRing(ring r)
static void p_Delete(poly *p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
void pEnlargeSet(poly **p, int l, int increment)
void rDelete(ring r)
unconditionally deletes fields in r
static void p_Setm(poly p, const ring r)
static nc_type & ncRingType(nc_struct *p)
static poly p_Add_q(poly p, poly q, const ring r)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
void Werror(const char *fmt,...)