7 #define TRANSEXT_PRIVATES
56 int *perm,
int *par_perm,
int P,
nMapFunc nMap)
59 int N = preimage_r->N;
62 if (perm!=
NULL)
for(i=1;i<=
N;i++)
Print(
"%d -> %d ",i,perm[i]);
65 if (par_perm!=
NULL)
for(i=0;i<
P;i++)
Print(
"%d -> %d ",i,par_perm[i]);
91 number
a = nMap((number)data, preimage_r->cf,
currRing->cf);
136 int C=((
matrix)data)->cols();
139 else R=((
matrix)data)->rows();
144 tmpR=((
map)data)->preimage;
147 if ((what==
FETCH_CMD)&& (preimage_r->cf == currRing->cf))
149 for (i=R*C-1;i>=0;i--)
158 for (i=R*C-1;i>=0;i--)
168 for (i=R*C-1;i>=0;i--)
177 for (i=R*C-1;i>=0;i--)
185 ((
map)data)->preimage=tmpR;
202 for(i=0;i<=l->
nr;i++)
208 preimage_r,perm,par_perm,P,nMap))
221 res->
data=(
char *)ml;
253 theMap->preimage=
NULL;
264 memset(v,0,
sizeof(
sleftv));
275 WarnS(
"ignoring denominators of coefficients...");
280 memset(&tmpW,0,
sizeof(
sleftv));
284 tmpW.
data = NUM (num);
315 memset(v,0,
sizeof(
sleftv));
318 memset(&tmpW,0,
sizeof(
sleftv));
324 if (num==
NULL) num=(number)R->qideal->m[0];
345 WerrorS(
"cannot apply subst for these coeffcients");
361 res->
rank =
id->rank;
383 theMap->preimage=
NULL;
385 theMap->m[var-1]=
pCopy(image);
402 memset(&tmpW,0,
sizeof(
sleftv));
431 res->
rank =
id->rank;
440 theMap->preimage=
NULL;
442 theMap->m[n-1]=
pCopy(e);
446 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)
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)
const CanonicalForm CFMap CFMap int &both_non_zero int n
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.
int int kStrategy strat if(h==NULL) return NULL
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.
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 idDelete(ideal *h, ring r=currRing)
delete an ideal
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)
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