1419{
1420 int i=0,
j,next_new_el;
1421 int idel_temp=
IDELEMS(temp_generators);
1422 int next_place_add;
1423 int p_length,red_deg,l_pairs=
IDELEMS(add_generators);
1424 poly next_p;
1429
1431 {
1432 if (syzstr->
res[index]->m[
j]!=
NULL)
1433 secgen_length[
j] = pLength(syzstr->
res[index]->m[
j]);
1434 }
1436 next_place_add =
IDELEMS(add_generators);
1437 while ((next_place_add>0) && (add_generators->m[next_place_add-1]==
NULL))
1438 next_place_add--;
1439 int next_deg = p_FDeg(temp_generators->m[
i],
currRing);
1440 next_new_el = next_place_add;
1441
1442 while ((
i<idel_temp) && (temp_generators->m[
i]!=
NULL))
1443 {
1444
1445#ifdef USE_REGULARITY
1447 {
1449 {
1450 while ((
i<idel_temp) && (temp_generators->m[
i]!=
NULL))
1451 {
1454 }
1455 break;
1456 }
1457 }
1458#endif
1459 while ((
i<idel_temp) && (p_FDeg(temp_generators->m[
i],
currRing)==next_deg))
1460 {
1461 next_p = temp_generators->m[
i];
1462 temp_generators->m[
i] =
NULL;
1463 next_p =
normalize(next_p,add_generators,syzstr,gen_length,&p_length,
1464 crit_comp);
1466 {
1468 {
1470
1471 }
1472 else
1473 {
1474 next_p =
syRedTailSyz(next_p,add_generators,syzstr->
res[index],crit_comp,syzstr,
1475 gen_length,secgen_length,&p_length);
1476 if (!
nIsOne(pGetCoeff(next_p)))
1478 if (next_place_add>=
IDELEMS(add_generators))
1479 {
1483 (
IDELEMS(add_generators)+16)*
sizeof(
int));
1484 IDELEMS(add_generators) += 16;
1486 }
1487 add_generators->m[next_place_add] = next_p;
1488 if (totake[index]==
NULL)
1489 totake[index] =
idInit(16,new_generators->rank);
1490 if ((*syzstr->
Tl)[index]==
IDELEMS(totake[index]))
1491 {
1493 (*syzstr->
Tl)[index]+16-
IDELEMS(totake[index]));
1494 for (
j=
IDELEMS(totake[index]);
j<(*syzstr->
Tl)[index]+16;
j++)
1495 totake[index]->
m[
j] =
NULL;
1496 IDELEMS(totake[index]) = (*syzstr->
Tl)[index]+16;
1497 }
1498#ifdef FULL_TOTAKE
1499 totake[index]->m[(*syzstr->
Tl)[index]] =
pCopy(next_p);
1500#else
1501 totake[index]->m[(*syzstr->
Tl)[index]] =
pHead(next_p);
1502#endif
1504#ifdef WITH_SCHREYER_ORD
1505 add_repr->m[next_place_add] =
pHead(add_generators->m[next_place_add]);
1506#else
1507 add_repr->m[next_place_add] =
pOne();
1508#endif
1509 ((*syzstr->
Tl)[index])++;
1510 pSetComp(add_repr->m[next_place_add],(*syzstr->
Tl)[index]);
1512 gen_length[next_place_add] = p_length;
1513 next_place_add++;
1514 }
1515 }
1517 }
1518 red_deg = next_deg;
1520 next_deg = p_FDeg(temp_generators->m[
i],
currRing);
1521 else
1522 next_deg = -1;
1523 if ((next_place_add>next_new_el) || (next_deg<0))
1524 {
1525
1527 while (pairs_left && ((next_deg<0) || (red_deg<= next_deg)))
1528 {
1530 add_repr,new_generators,new_repr,crit_comp,&next_new_el);
1532 add_repr,new_generators,new_repr,crit_comp,&red_deg,&next_place_add,&gen_length,
1533 totake);
1534 }
1535 }
1536 }
1540}
CanonicalForm normalize(const CanonicalForm &F)
normalize a poly, i.e. in char 0 clear denominators, remove integer content in char p divide by leadi...
#define omRealloc0Size(addr, o_size, size)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pSetmComp(p)
TODO:
#define pCopy(p)
return a copy of the poly
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 void updatePairsHIndex(SSet *resPairs, int *l_pairs, syStrategy, int index, ideal add_generators, ideal, ideal, ideal, int, int *first_new)
static poly syRedTailSyz(poly tored, ideal red, ideal sec_red, int crit_comp, syStrategy syzstr, int *gen_length, int *secgen_length, int *tored_length)