7 #define TRANSEXT_PRIVATES 47 int *perm,
int *par_perm,
int P,
nMapFunc nMap)
57 while((i<currRing->
N)&&(perm[i]==0)) i++;
64 if (perm[prev_nonnull] > perm[i])
68 Warn(
"imap not usable for permuting variables, use map (%s <-> %s)",
currRing->names[prev_nonnull-1],
currRing->names[i-1]);
80 int N = preimage_r->N;
83 if (perm!=
NULL)
for(i=1;i<=
N;i++)
Print(
"%d -> %d ",i,perm[i]);
86 if (par_perm!=
NULL)
for(i=0;i<P;i++)
Print(
"%d -> %d ",i,par_perm[i]);
107 number a = nMap((number)data, preimage_r->cf,
currRing->cf);
136 p_Test((poly)data,preimage_r);
138 res->
data=(
void *)
maEval(theMap, (poly)data, preimage_r, nMap, (ideal)s, currRing);
150 int C=((
matrix)data)->cols();
153 else R=((
matrix)data)->rows();
158 tmpR=((
map)data)->preimage;
161 if ((what==
FETCH_CMD)&& (preimage_r->cf == currRing->cf))
163 for (i=R*C-1;i>=0;i--)
165 m->
m[
i]=
prCopyR(((ideal)data)->m[i], preimage_r, currRing);
171 for (i=R*C-1;i>=0;i--)
173 m->
m[
i]=
p_PermPoly(((ideal)data)->m[i],perm,preimage_r,currRing,
174 nMap,par_perm,P,use_mult);
182 for (i=R*C-1;i>=0;i--)
184 m->
m[
i]=
maEval(theMap, ((ideal)data)->m[i], preimage_r, nMap, (ideal)s, currRing);
191 for (i=R*C-1;i>=0;i--)
199 ((
map)data)->preimage=tmpR;
216 for(i=0;i<=l->
nr;i++)
222 preimage_r,perm,par_perm,P,nMap))
235 res->
data=(
char *)ml;
267 theMap->preimage=
NULL;
278 memset(v,0,
sizeof(
sleftv));
281 p_Test((poly)NUM((fraction)d), R);
289 WarnS(
"ignoring denominators of coefficients...");
294 memset(&tmpW,0,
sizeof(
sleftv));
296 p_Test((poly)NUM((fraction)num), R);
298 tmpW.
data = NUM ((fraction)num);
329 memset(v,0,
sizeof(
sleftv));
332 memset(&tmpW,0,
sizeof(
sleftv));
338 if (num==
NULL) num=(number)R->qideal->m[0];
359 WerrorS(
"cannot apply subst for these coeffcients");
375 res->
rank =
id->rank;
411 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(...)
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)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
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