7 #define TRANSEXT_PRIVATES 55 int *perm,
int *par_perm,
int P,
nMapFunc nMap)
58 int N = preimage_r->N;
61 if (perm!=
NULL)
for(i=1;i<=
N;i++)
Print(
"%d -> %d ",i,perm[i]);
64 if (par_perm!=
NULL)
for(i=0;i<
P;i++)
Print(
"%d -> %d ",i,par_perm[i]);
85 number
a = nMap((number)data, preimage_r->cf,
currRing->cf);
116 res->
data=(
void *)
maEval(theMap, (
poly)data, preimage_r, nMap, (ideal)s, currRing);
128 int C=((
matrix)data)->cols();
131 else R=((
matrix)data)->rows();
136 tmpR=((
map)data)->preimage;
139 if ((what==
FETCH_CMD)&& (preimage_r->cf == currRing->cf))
141 for (i=R*C-1;i>=0;i--)
143 m->
m[
i]=
prCopyR(((ideal)data)->m[i], preimage_r, currRing);
149 for (i=R*C-1;i>=0;i--)
151 m->
m[
i]=
p_PermPoly(((ideal)data)->m[i],perm,preimage_r,currRing,
160 for (i=R*C-1;i>=0;i--)
162 m->
m[
i]=
maEval(theMap, ((ideal)data)->m[i], preimage_r, nMap, (ideal)s, currRing);
169 for (i=R*C-1;i>=0;i--)
177 ((
map)data)->preimage=tmpR;
194 for(i=0;i<=l->
nr;i++)
200 preimage_r,perm,par_perm,P,nMap))
213 res->
data=(
char *)ml;
245 theMap->preimage=
NULL;
256 memset(v,0,
sizeof(
sleftv));
267 WarnS(
"ignoring denominators of coefficients...");
272 memset(&tmpW,0,
sizeof(
sleftv));
276 tmpW.
data = NUM ((fraction)num);
307 memset(v,0,
sizeof(
sleftv));
310 memset(&tmpW,0,
sizeof(
sleftv));
316 if (num==
NULL) num=(number)R->qideal->m[0];
337 WerrorS(
"cannot apply subst for these coeffcients");
353 res->
rank =
id->rank;
375 theMap->preimage=
NULL;
377 theMap->m[var-1]=
pCopy(image);
386 char *tmp = theMap->preimage;
387 theMap->preimagei=(
char*)1L;
389 theMap->preimage=tmp;
399 memset(&tmpW,0,
sizeof(
sleftv));
428 res->
rank =
id->rank;
437 theMap->preimage=
NULL;
439 theMap->m[n-1]=
pCopy(e);
443 memset(&tmpW,0,
sizeof(
sleftv));
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) ...
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
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
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 bool rIsPluralRing(const ring r)
we must always have this test!
poly pSubstPoly(poly p, int var, poly image)
#define pGetComp(p)
Component.
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 ...
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 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
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar)
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)
ideal fast_map(ideal map_id, ring map_r, ideal image_id, ring image_r)
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)
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