1416 int i=0,
j,next_new_el;
1417 int idel_temp=
IDELEMS(temp_generators);
1419 int p_length,red_deg,l_pairs=
IDELEMS(add_generators);
1432 next_place_add =
IDELEMS(add_generators);
1433 while ((next_place_add>0) && (add_generators->m[next_place_add-1]==
NULL))
1436 next_new_el = next_place_add;
1438 while ((i<idel_temp) && (temp_generators->m[i]!=
NULL))
1441 #ifdef USE_REGULARITY 1446 while ((i<idel_temp) && (temp_generators->m[i]!=
NULL))
1448 pDelete(&temp_generators->m[i]);
1455 while ((i<idel_temp) && (
p_FDeg(temp_generators->m[i],
currRing)==next_deg))
1457 next_p = temp_generators->m[
i];
1458 temp_generators->m[
i] =
NULL;
1459 next_p =
normalize(next_p,add_generators,syzstr,gen_length,&p_length,
1471 gen_length,secgen_length,&p_length);
1474 if (next_place_add>=
IDELEMS(add_generators))
1479 (
IDELEMS(add_generators)+16)*
sizeof(
int));
1480 IDELEMS(add_generators) += 16;
1483 add_generators->m[next_place_add] = next_p;
1489 (*syzstr->
Tl)[index]+16-
IDELEMS(totake[index]));
1490 for (
j=
IDELEMS(totake[index]);
j<(*syzstr->
Tl)[index]+16;
j++)
1491 totake[index]->
m[
j] =
NULL;
1492 IDELEMS(totake[index]) = (*syzstr->
Tl)[index]+16;
1495 totake[
index]->m[(*syzstr->
Tl)[index]] =
pCopy(next_p);
1497 totake[
index]->m[(*syzstr->
Tl)[index]] =
pHead(next_p);
1500 #ifdef WITH_SCHREYER_ORD 1501 add_repr->m[next_place_add] =
pHead(add_generators->m[next_place_add]);
1503 add_repr->m[next_place_add] =
pOne();
1505 ((*syzstr->
Tl)[index])++;
1506 pSetComp(add_repr->m[next_place_add],(*syzstr->
Tl)[index]);
1508 gen_length[next_place_add] = p_length;
1519 if ((next_place_add>next_new_el) || (next_deg<0))
1523 while (pairs_left && ((next_deg<0) || (red_deg<= next_deg)))
1526 add_repr,new_generators,new_repr,crit_comp,&next_new_el);
1528 add_repr,new_generators,new_repr,crit_comp,&red_deg,&next_place_add,&gen_length,
#define pSetmComp(p)
TODO:
#define omRealloc0Size(addr, o_size, size)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
static void updatePairsHIndex(SSet *resPairs, int *l_pairs, syStrategy, int index, ideal add_generators, ideal, ideal, ideal, int, int *first_new)
#define omFreeSize(addr, size)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
#define pGetComp(p)
Component.
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static BOOLEAN reducePairsHIndex(SSet resPairs, int l_pairs, syStrategy syzstr, int index, ideal add_generators, ideal add_repr, ideal new_generators, ideal new_repr, int crit_comp, int *red_deg, int *next_place_add, int **g_l, resolvente totake)
static long p_FDeg(const poly p, const ring r)
static unsigned pLength(poly a)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static int index(p_Length length, p_Ord ord)
static poly syRedTailSyz(poly tored, ideal red, ideal sec_red, int crit_comp, syStrategy syzstr, int *gen_length, int *secgen_length, int *tored_length)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void pEnlargeSet(poly **p, int l, int increment)
void pNorm(poly p, const ring R=currRing)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define pCopy(p)
return a copy of the poly