 |
My Project
debian-1:4.1.1-p2+ds-4build3
|
Go to the source code of this file.
|
static poly | maGetMaxExpP (poly *max_map_monomials, int n_max_map_monomials, ring map_r, poly pi_m, ring pi_r) |
|
static unsigned long | maGetMaxExp (ideal pi_id, ring pi_r, ideal map_id, ring map_r) |
|
mapoly | maMonomial_Create (poly p, ring, sBucket_pt bucket) |
|
void | maMonomial_Destroy (mapoly mp, ring src_r, ring dest_r) |
|
mapoly | maPoly_InsertMonomial (mapoly &into, mapoly what, ring src_r) |
|
mapoly | maPoly_InsertMonomial (mapoly &into, poly p, ring src_r, sBucket_pt bucket) |
|
static void | maPoly_InsertPoly (mapoly &into, poly what, ring src_r, sBucket_pt bucket) |
|
void | maMap_CreatePolyIdeal (ideal map_id, ring map_r, ring src_r, ring dest_r, mapoly &mp, maideal &mideal) |
|
void | maMap_CreateRings (ideal map_id, ring map_r, ideal image_id, ring image_r, ring &src_r, ring &dest_r, BOOLEAN &simple) |
|
static void | maMap_KillRings (ring map_r, ring image_r, ring src_r, ring dest_r) |
|
ideal | maIdeal_2_Ideal (maideal m_id, ring) |
|
void | maPoly_GetLength (mapoly mp, int &length) |
|
ideal | fast_map_common_subexp (const ideal map_id, const ring map_r, const ideal image_id, const ring image_r) |
|
static int | maPoly_Substitute (macoeff c, poly p, ring dest_r) |
|
static poly | maPoly_EvalMon (poly src, ring src_r, poly *dest_id, ring dest_r) |
|
void | maPoly_Eval (mapoly root, ring src_r, ideal dest_id, ring dest_r, int total_cost) |
|
static poly | maEggT (const poly m1, const poly m2, poly &q1, poly &q2, const ring r) |
|
static mapoly | maFindBestggT (mapoly mp, mapoly &choice, mapoly &fp, mapoly &fq, const ring r) |
|
void | maPoly_Optimize (mapoly mpoly, ring src_r) |
|
◆ HAVE_DEST_R
◆ HAVE_MAP_OPTIMIZE
#define HAVE_MAP_OPTIMIZE 1 |
◆ HAVE_SRC_R
◆ fast_map_common_subexp()
ideal fast_map_common_subexp |
( |
const ideal |
map_id, |
|
|
const ring |
map_r, |
|
|
const ideal |
image_id, |
|
|
const ring |
image_r |
|
) |
| |
Definition at line 354 of file fast_maps.cc.
367 if (dest_r != image_r)
382 Print(
"map[%ld:%d]{%d:", dest_r->bitmask, dest_r->ExpL_Size,
length);
386 #if HAVE_MAP_OPTIMIZE > 0
405 if (dest_r != image_r)
415 res_image_id = res_dest_id;
◆ maEggT()
static poly maEggT |
( |
const poly |
m1, |
|
|
const poly |
m2, |
|
|
poly & |
q1, |
|
|
poly & |
q2, |
|
|
const ring |
r |
|
) |
| |
|
static |
Definition at line 586 of file fast_maps.cc.
595 for (
i=1;
i<=r->N;
i++)
599 if (e1 > 0 && e2 > 0)
601 unsigned long em = (e1 > e2 ? e2 : e1);
◆ maFindBestggT()
◆ maGetMaxExp()
static unsigned long maGetMaxExp |
( |
ideal |
pi_id, |
|
|
ring |
pi_r, |
|
|
ideal |
map_id, |
|
|
ring |
map_r |
|
) |
| |
|
static |
Definition at line 64 of file fast_maps.cc.
67 poly* max_map_monomials = (poly*)
omAlloc(
IDELEMS(map_id)*
sizeof(poly));
68 poly max_pi_i, max_map_i;
82 if (temp >
max){
max=temp; }
◆ maGetMaxExpP()
static poly maGetMaxExpP |
( |
poly * |
max_map_monomials, |
|
|
int |
n_max_map_monomials, |
|
|
ring |
map_r, |
|
|
poly |
pi_m, |
|
|
ring |
pi_r |
|
) |
| |
|
static |
Definition at line 35 of file fast_maps.cc.
39 int n =
si_min(pi_r->N, n_max_map_monomials);
41 unsigned long e_i, e_j;
43 poly map_j =
p_Init(map_r);
45 for (
i=1;
i <= n;
i++)
49 m_i = max_map_monomials[
i-1];
52 for (
j = 1;
j<= map_r->N;
j++)
◆ maIdeal_2_Ideal()
ideal maIdeal_2_Ideal |
( |
maideal |
m_id, |
|
|
ring |
|
|
) |
| |
◆ maMap_CreatePolyIdeal()
void maMap_CreatePolyIdeal |
( |
ideal |
map_id, |
|
|
ring |
map_r, |
|
|
ring |
src_r, |
|
|
ring |
dest_r, |
|
|
mapoly & |
mp, |
|
|
maideal & |
mideal |
|
) |
| |
◆ maMap_CreateRings()
void maMap_CreateRings |
( |
ideal |
map_id, |
|
|
ring |
map_r, |
|
|
ideal |
image_id, |
|
|
ring |
image_r, |
|
|
ring & |
src_r, |
|
|
ring & |
dest_r, |
|
|
BOOLEAN & |
simple |
|
) |
| |
Definition at line 281 of file fast_maps.cc.
286 int* weights = (
int*)
omAlloc0(map_r->N*
sizeof(
int));
300 unsigned long maxExp =
maGetMaxExp(map_id, map_r, image_id, image_r);
301 if (maxExp <= 1) maxExp = 2;
302 else if (maxExp > (
unsigned long) image_r->bitmask)
303 maxExp = (
unsigned long) image_r->bitmask;
◆ maMap_KillRings()
static void maMap_KillRings |
( |
ring |
map_r, |
|
|
ring |
image_r, |
|
|
ring |
src_r, |
|
|
ring |
dest_r |
|
) |
| |
|
static |
◆ maMonomial_Create()
Definition at line 138 of file fast_maps.cc.
148 mp->coeff->bucket = bucket;
◆ maMonomial_Destroy()
void maMonomial_Destroy |
( |
mapoly |
mp, |
|
|
ring |
src_r, |
|
|
ring |
dest_r |
|
) |
| |
◆ maPoly_Eval()
void maPoly_Eval |
( |
mapoly |
root, |
|
|
ring |
src_r, |
|
|
ideal |
dest_id, |
|
|
ring |
dest_r, |
|
|
int |
total_cost |
|
) |
| |
Definition at line 495 of file fast_maps.cc.
498 if ((root!=
NULL) && (root->next!=
NULL))
514 int next_print_cost = total_cost;
529 if (
p->f1->ref>0) f1=
p_Copy(f1,dest_r);
535 if (
p->f2->ref>0) f2=
p_Copy(f2,dest_r);
559 if (cost > next_print_cost)
562 next_print_cost += total_cost;
◆ maPoly_EvalMon()
static poly maPoly_EvalMon |
( |
poly |
src, |
|
|
ring |
src_r, |
|
|
poly * |
dest_id, |
|
|
ring |
dest_r |
|
) |
| |
|
static |
◆ maPoly_GetLength()
void maPoly_GetLength |
( |
mapoly |
mp, |
|
|
int & |
length |
|
) |
| |
◆ maPoly_InsertMonomial() [1/2]
Definition at line 184 of file fast_maps.cc.
220 iter->ref += what->ref;
224 while (coeff->next !=
NULL) coeff = coeff->next;
225 coeff->next =
iter->coeff;
226 iter->coeff = what->coeff;
◆ maPoly_InsertMonomial() [2/2]
◆ maPoly_InsertPoly()
static void maPoly_InsertPoly |
( |
mapoly & |
into, |
|
|
poly |
what, |
|
|
ring |
src_r, |
|
|
sBucket_pt |
bucket |
|
) |
| |
|
static |
◆ maPoly_Optimize()
void maPoly_Optimize |
( |
mapoly |
mpoly, |
|
|
ring |
src_r |
|
) |
| |
◆ maPoly_Substitute()
static int maPoly_Substitute |
( |
macoeff |
c, |
|
|
poly |
p, |
|
|
ring |
dest_r |
|
) |
| |
|
static |
◆ macoeffBin
◆ mapolyBin
static int si_min(const int a, const int b)
static BOOLEAN Equal(number a, number b, const coeffs r)
static poly maPoly_EvalMon(poly src, ring src_r, poly *dest_id, ring dest_r)
static poly maEggT(const poly m1, const poly m2, poly &q1, poly &q2, const ring r)
class maideal_s * maideal
ideal maIdeal_2_Ideal(maideal m_id, ring)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
void maMap_CreateRings(ideal map_id, ring map_r, ideal image_id, ring image_r, ring &src_r, ring &dest_r, BOOLEAN &simple)
void maMonomial_Destroy(mapoly mp, ring src_r, ring dest_r)
static BOOLEAN rField_is_Domain(const ring r)
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
static unsigned long maGetMaxExp(ideal pi_id, ring pi_r, ideal map_id, ring map_r)
ideal idrShallowCopyR(ideal id, ring src_r, ring dest_r)
void rKillModifiedRing(ring r)
static BOOLEAN length(leftv result, leftv arg)
void maPoly_Optimize(mapoly mpoly, ring src_r)
void id_ShallowDelete(ideal *h, ring r)
Shallowdeletes an ideal/matrix.
static mapoly maFindBestggT(mapoly mp, mapoly &choice, mapoly &fp, mapoly &fq, const ring 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 unsigned pLength(poly a)
static bool Greater(mono_type m1, mono_type m2)
static poly p_Copy(poly p, const ring r)
returns a copy of p
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
static void maMap_KillRings(ring map_r, ring image_r, ring src_r, ring dest_r)
static BOOLEAN p_IsConstantComp(const poly p, const ring r)
ring rModifyRing_Simple(ring r, BOOLEAN ommit_degree, BOOLEAN ommit_comp, unsigned long exp_limit, BOOLEAN &simple)
void PrintS(const char *s)
#define omFreeSize(addr, size)
void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
adds poly p to bucket destroys p!
static int maPoly_Substitute(macoeff c, poly p, ring dest_r)
mapoly maMonomial_Create(poly p, ring, sBucket_pt bucket)
static BOOLEAN rField_is_Ring(const ring r)
sBucket_pt sBucketCreate(const ring r)
static int max(int a, int b)
poly prShallowCopyR_NoSort(poly p, ring r, ring dest_r)
static poly p_Init(const ring r, omBin bin)
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,...
#define __pp_Mult_nn(p, n, r)
static void p_LmFree(poly p, ring)
#define p_LmCmpAction(p, q, r, actionE, actionG, actionS)
long p_Deg(poly a, const ring r)
static void p_Delete(poly *p, const ring r)
mapoly maPoly_InsertMonomial(mapoly &into, mapoly what, ring src_r)
void maPoly_GetLength(mapoly mp, int &length)
mapoly maMonomial_Free(mapoly monomial, ring src_r, ring dest_r=NULL)
void maPoly_Eval(mapoly root, ring src_r, ideal dest_id, ring dest_r, int total_cost)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static void maPoly_InsertPoly(mapoly &into, poly what, ring src_r, sBucket_pt bucket)
class macoeff_s * macoeff
static long p_AddExp(poly p, int v, long ee, ring r)
static poly maGetMaxExpP(poly *max_map_monomials, int n_max_map_monomials, ring map_r, poly pi_m, ring pi_r)
static void p_Setm(poly p, const ring r)
static long p_Totaldegree(poly p, const ring r)
static unsigned long p_GetMaxExp(const unsigned long l, const ring r)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly p_Mult_q(poly p, poly q, const ring r)
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)
void maMap_CreatePolyIdeal(ideal map_id, ring map_r, ring src_r, ring dest_r, mapoly &mp, maideal &mideal)
poly prShallowCopyR(poly p, ring r, ring dest_r)
void rKillModified_Wp_Ring(ring r)