7 #define TRANSEXT_PRIVATES 60 while((i<currRing->
N)&&(perm[i]==0)) i++;
67 if (perm[prev_nonnull] > perm[i])
71 Warn(
"imap not usable for permuting variables, use map (%s <-> %s)",
currRing->names[prev_nonnull-1],
currRing->names[i-1]);
83 int N = preimage_r->N;
86 if (perm!=
NULL)
for(i=1;i<=
N;i++)
Print(
"%d -> %d ",i,perm[i]);
89 if (par_perm!=
NULL)
for(i=0;i<
P;i++)
Print(
"%d -> %d ",i,par_perm[i]);
110 number
a = nMap((number)data, preimage_r->cf,
currRing->cf);
141 res->
data=(
void *)
maEval(theMap, (
poly)data, preimage_r, nMap, (ideal)s, currRing);
153 int C=((
matrix)data)->cols();
156 else R=((
matrix)data)->rows();
161 tmpR=((
map)data)->preimage;
164 if ((what==
FETCH_CMD)&& (preimage_r->cf == currRing->cf))
166 for (i=R*C-1;i>=0;i--)
168 m->
m[
i]=
prCopyR(((ideal)data)->m[i], preimage_r, currRing);
174 for (i=R*C-1;i>=0;i--)
176 m->
m[
i]=
p_PermPoly(((ideal)data)->m[i],perm,preimage_r,currRing,
177 nMap,par_perm,P,use_mult);
185 for (i=R*C-1;i>=0;i--)
187 m->
m[
i]=
maEval(theMap, ((ideal)data)->m[i], preimage_r, nMap, (ideal)s, currRing);
194 for (i=R*C-1;i>=0;i--)
202 ((
map)data)->preimage=tmpR;
219 for(i=0;i<=l->
nr;i++)
225 preimage_r,perm,par_perm,P,nMap))
238 res->
data=(
char *)ml;
270 theMap->preimage=
NULL;
281 memset(v,0,
sizeof(
sleftv));
292 WarnS(
"ignoring denominators of coefficients...");
297 memset(&tmpW,0,
sizeof(
sleftv));
301 tmpW.
data = NUM ((fraction)num);
332 memset(v,0,
sizeof(
sleftv));
335 memset(&tmpW,0,
sizeof(
sleftv));
341 if (num==
NULL) num=(number)R->qideal->m[0];
362 WerrorS(
"cannot apply subst for these coeffcients");
378 res->
rank =
id->rank;
414 res->
rank =
id->rank;
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
static FORCE_INLINE number n_GetNumerator(number &n, const coeffs r)
return the numerator of n (if elements of r are by nature not fractional, result is n) ...
const CanonicalForm int s
Class used for (list of) interpreter objects.
ideal idSubstPar(ideal id, int n, poly e)
poly prCopyR(poly p, ring src_r, ring dest_r)
#define idDelete(H)
delete an ideal
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static int rPar(const ring r)
(r->cf->P)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
poly p_SubstPoly(poly p, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap, matrix cache=NULL)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
ideal idSubstPoly(ideal id, int n, poly e)
int maMaxDeg_Ma(ideal a, ring preimage_r)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
void WerrorS(const char *s)
(fraction), see transext.h
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
poly pSubstPoly(poly p, int var, poly image)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static FORCE_INLINE number n_Param(const int iParameter, const coeffs r)
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
const CanonicalForm CFMap CFMap & N
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN p_IsConstant(const poly p, const ring r)
poly pSubstPar(poly p, int par, poly image)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible ...
void PrintS(const char *s)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
INLINE_THIS void Init(int l=0)
matrix mpNew(int r, int c)
create a r x c zero-matrix
void p_Normalize(poly p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
const Variable & v
< [in] a sqrfree bivariate poly
poly p_MinPolyNormalize(poly p, const ring r)
poly n_PermNumber(const number z, const int *par_perm, const int, const ring src, const ring dst)
const char * Tok2Cmdname(int tok)
static FORCE_INLINE number n_GetDenom(number &n, const coeffs r)
return the denominator of n (if elements of r are by nature not fractional, result is 1) ...
int maMaxDeg_P(poly p, ring preimage_r)
void Clean(ring r=currRing)
ideal id_SubstPoly(ideal id, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
#define omFreeBin(addr, bin)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap, ideal s, const ring dst_r)
#define pCopy(p)
return a copy of the poly