27#define HAVE_MAP_OPTIMIZE 0
44 for (
i=1;
i <= n;
i++)
147 mp->coeff->bucket = bucket;
159 if (mp->coeff !=
NULL)
171 if (mp->dest !=
NULL)
220 iter->ref += what->ref;
224 while (coeff->next !=
NULL) coeff = coeff->next;
225 coeff->next =
iter->coeff;
226 iter->coeff = what->coeff;
328 for (
int i= 0;
i < m_id->n;
i++)
330 if (m_id->buckets[
i]!=
NULL)
386#if HAVE_MAP_OPTIMIZE > 0
500 if ((root!=
NULL) && (root->next!=
NULL))
597 for (
i=1;
i<=r->N;
i++)
601 if (
e1 > 0 &&
e2 > 0)
static int si_min(const int a, const int b)
void maMonomial_Destroy(mapoly mp, ring src_r, ring dest_r)
ideal fast_map_common_subexp(const ideal map_id, const ring map_r, const ideal image_id, const ring image_r)
void maMap_CreateRings(ideal map_id, ring map_r, ideal image_id, ring image_r, ring &src_r, ring &dest_r, BOOLEAN &simple)
static poly maGetMaxExpP(poly *max_map_monomials, int n_max_map_monomials, ring map_r, poly pi_m, ring pi_r)
STATIC_VAR omBin macoeffBin
static poly maEggT(const poly m1, const poly m2, poly &q1, poly &q2, const ring r)
void maMap_CreatePolyIdeal(ideal map_id, ring map_r, ring src_r, ring dest_r, mapoly &mp, maideal &mideal)
void maPoly_GetLength(mapoly mp, int &length)
mapoly maPoly_InsertMonomial(mapoly &into, mapoly what, ring src_r)
static void maPoly_InsertPoly(mapoly &into, poly what, ring src_r, sBucket_pt bucket)
mapoly maMonomial_Create(poly p, ring, sBucket_pt bucket)
ideal maIdeal_2_Ideal(maideal m_id, ring)
static poly maPoly_EvalMon(poly src, ring src_r, poly *dest_id, ring dest_r)
static int maPoly_Substitute(macoeff c, poly p, ring dest_r)
static mapoly maFindBestggT(mapoly mp, mapoly &choice, mapoly &fp, mapoly &fq, const ring r)
static unsigned long maGetMaxExp(ideal pi_id, ring pi_r, ideal map_id, ring map_r)
void maPoly_Eval(mapoly root, ring src_r, ideal dest_id, ring dest_r, int total_cost)
STATIC_VAR omBin mapolyBin
static void maMap_KillRings(ring map_r, ring image_r, ring src_r, ring dest_r)
void maPoly_Optimize(mapoly mpoly, ring src_r)
class macoeff_s * macoeff
void maMonomial_Out(mapoly monomial, ring src_r, ring dest_r=NULL)
class maideal_s * maideal
void maPoly_Out(mapoly mpoly, ring src_ring, ring dest_r=NULL)
mapoly maMonomial_Free(mapoly monomial, ring src_r, ring dest_r=NULL)
static int max(int a, int b)
static BOOLEAN Equal(number a, number b, const coeffs)
static bool Greater(mono_type m1, mono_type m2)
static BOOLEAN length(leftv result, leftv arg)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define omFreeSize(addr, size)
#define omFreeBin(addr, bin)
#define omGetSpecBin(size)
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0,...
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
long p_Deg(poly a, const ring r)
static int pLength(poly a)
static poly p_Mult_q(poly p, poly q, const ring r)
static BOOLEAN p_IsConstantComp(const poly p, const ring r)
like the respective p_LmIs* routines, except that p might be empty
static long p_AddExp(poly p, int v, long ee, ring r)
static unsigned long p_GetMaxExp(const unsigned long l, const ring r)
#define __pp_Mult_nn(p, n, r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
#define p_LmCmpAction(p, q, r, actionE, actionG, actionS)
static void p_Delete(poly *p, const ring r)
static void p_LmFree(poly p, ring)
static poly p_Init(const ring r, omBin bin)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
void p_wrp(poly p, ring lmRing, ring tailRing)
poly prShallowCopyR(poly p, ring r, ring dest_r)
ideal idrShallowCopyR(ideal id, ring src_r, ring dest_r)
poly prShallowCopyR_NoSort(poly p, ring r, ring dest_r)
void PrintS(const char *s)
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
void rKillModifiedRing(ring r)
void rKillModified_Wp_Ring(ring r)
ring rModifyRing_Simple(ring r, BOOLEAN ommit_degree, BOOLEAN ommit_comp, unsigned long exp_limit, BOOLEAN &simple)
static BOOLEAN rField_is_Domain(const ring r)
#define rField_is_Ring(R)
void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
adds poly p to bucket destroys p!
sBucket_pt sBucketCreate(const ring r)
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_ShallowDelete(ideal *h, ring r)
Shallowdeletes an ideal/matrix.