16 static void find_subst_for_map(
const ring preimage_r,
const ring image_r,
const ideal image,
int &var,poly &
p)
23 if (image->m[i]!=
NULL)
31 || (
p_GetExp(image->m[i],v,image_r)!=1))
87 ideal
maMapIdeal(
const ideal map_id,
const ring preimage_r,
const ideal image_id,
const ring image_r,
const nMapFunc nMap)
107 return id_SubstPoly(map_id,var,p,preimage_r,image_r,nMap);
113 && (map_id->
nrows==1)
114 && (map_id->
rank==1))
124 for(i=
IDELEMS(image_id)-1;i>=0;i--)
127 if ((t==0) || (t>1)) sz_more++;
129 if (((sz_l > sz*2) && (sz_more != 1))||(sz<5))
139 int C=((
matrix)map_id)->cols();
140 int R=((
matrix)map_id)->rows();
142 int N = preimage_r->N;
145 for (i=R*C-1;i>=0;i--)
147 if (map_id->m[i]!=
NULL)
149 m->
m[
i]=
maEval((
map)image_id, map_id->m[i], preimage_r, nMap, (ideal)cache, image_r);
155 ii->
rank=((ideal)map_id)->rank;
159 poly
maMapPoly(
const poly map_p,
const ring map_r,
const ideal image_id,
const ring image_r,
const nMapFunc nMap)
162 poly
p=
maEval((
map)image_id, map_p, map_r, nMap, (ideal)s, image_r);
167 number
maEvalAt(
const poly
p,
const number* pt,
const ring r)
170 for(
int i=r->N-1;
i>=0;
i--)
number maEvalAt(const poly p, const number *pt, const ring r)
evaluate the polynomial p at the pt given by the array pt
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
const CanonicalForm int s
#define idDelete(H)
delete an ideal
static int si_min(const int a, const int b)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
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)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
int maMaxDeg_Ma(ideal a, ring preimage_r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
static void p_LmFree(poly p, ring)
matrix ma_ApplyPermForMap(const matrix to_map, const ring preimage_r, const ideal image, const ring image_r, const nMapFunc nMap)
helper function for maMapIdeal mapping ideal/matrix/module for the case of a permutation: maps the id...
int p_IsUnivariate(poly p, const ring r)
return i, if poly depends only on var(i)
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...
const CanonicalForm CFMap CFMap & N
ideal maMapIdeal(const ideal map_id, const ring preimage_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for ideals/module/matrix map_id: the ideal to map map_r: the base ring for map_id imag...
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void PrintS(const char *s)
ideal fast_map_common_subexp(const ideal map_id, const ring map_r, const ideal image_id, const ring image_r)
static unsigned pLength(poly a)
matrix mpNew(int r, int c)
create a r x c zero-matrix
ideal idInit(int idsize, int rank)
initialise an ideal / module
const Variable & v
< [in] a sqrfree bivariate poly
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
int maMaxDeg_P(poly p, ring preimage_r)
static void find_subst_for_map(const ring preimage_r, const ring image_r, const ideal image, int &var, poly &p)
ideal id_SubstPoly(ideal id, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap)
poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap, ideal s, const ring dst_r)