7#define TRANSEXT_PRIVATES
46 int *perm,
int *par_perm,
int P,
nMapFunc nMap)
56 while((i<preimage_r->
N)&&(perm[
i]==0))
i++;
61 for(;
i<=preimage_r->N;
i++)
63 if (perm[prev_nonnull] > perm[
i])
67 Warn(
"imap not usable for permuting variables, use map (%s <-> %s)", preimage_r->names[prev_nonnull-1],preimage_r->names[
i-1]);
79 int N = preimage_r->N;
85 if (par_perm!=
NULL)
for(
i=0;
i<P;
i++)
Print(
"%d -> %d ",
i,par_perm[
i]);
106 number a = nMap((number)data, preimage_r->cf,
currRing->cf);
158 p_Test((poly)data,preimage_r);
170 int C=((
matrix)data)->cols();
178 tmpR=((
map)data)->preimage;
188 for (
i=
R*C-1;
i>=0;
i--)
196 for (
i=
R*C-1;
i>=0;
i--)
199 nMap,par_perm,P,use_mult);
207 for (
i=
R*C-1;
i>=0;
i--)
216 ((
map)data)->preimage=tmpR;
233 for(
i=0;
i<=
l->nr;
i++)
239 preimage_r,perm,par_perm,P,nMap))
252 res->data=(
char *)ml;
284 theMap->preimage=
NULL;
298 p_Test((poly)NUM((fraction)d),
R);
306 WarnS(
"ignoring denominators of coefficients...");
311 memset(&tmpW,0,
sizeof(
sleftv));
315 tmpW.
data = NUM ((fraction)
num);
336 poly ppp =
pMult((poly)(
v->data),
pp);
349 memset(&tmpW,0,
sizeof(
sleftv));
368 poly ppp =
pMult((poly)(
v->data),
pp);
376 WerrorS(
"cannot apply subst for these coeffcients");
392 res->rank =
id->rank;
434 res->rank =
id->rank;
447 res->rank =
id->rank;
const CanonicalForm CFMap CFMap & N
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Class used for (list of) interpreter objects.
void Clean(ring r=currRing)
INLINE_THIS void Init(int l=0)
Coefficient rings, fields and other domains suitable for Singular polynomials.
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....
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)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
number ndCopyMap(number a, const coeffs src, const coeffs 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
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
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)
@ n_rep_poly
(poly), see algext.h
@ n_rep_rat_fct
(fraction), see transext.h
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
if(!FE_OPT_NO_SHELL_FLAG)(void) system(sys)
poly maMapPoly(const poly map_p, const ring map_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for poly (vector) map_p: the poly (vector) to map map_r: the base ring for map_p image...
ideal id_SubstPoly(ideal id, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap)
poly p_SubstPoly(poly p, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap, matrix cache=NULL)
const char * Tok2Cmdname(int tok)
#define idDelete(H)
delete an ideal
EXTERN_VAR omBin sleftv_bin
poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap, ideal s, const ring dst_r)
int maMaxDeg_Ma(ideal a, ring preimage_r)
poly p_MinPolyNormalize(poly p, const ring r)
poly pSubstPoly(poly p, int var, poly image)
ideal idSubstPoly(ideal id, int n, poly e)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
ideal idSubstPar(ideal id, int n, poly e)
poly pSubstPar(poly p, int par, poly image)
matrix mpNew(int r, int c)
create a r x c zero-matrix
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define omFreeBin(addr, bin)
poly n_PermNumber(const number z, const int *par_perm, const int, const ring src, const ring dst)
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)
void p_Normalize(poly p, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
static BOOLEAN p_IsConstant(const poly p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pCopy(p)
return a copy of the poly
poly prCopyR(poly p, ring src_r, ring dest_r)
void PrintS(const char *s)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static int rPar(const ring r)
(r->cf->P)
static BOOLEAN rIsLPRing(const ring r)
poly sBucketPeek(sBucket_pt b)
ideal idInit(int idsize, int rank)
initialise an ideal / module