Definition at line 1453 of file gb-default.cpp.
1455{
1456
1457
1458 int tmf, wt;
1459 int count = -1;
1460
1462
1464 {
1465 buffer o;
1466 o << "considering ";
1468 o << " : ";
1470 }
1472
1473 while (!
R->gbvector_is_zero(
p->f()))
1474 {
1476 {
1478 return false;
1479 }
1481 {
1483 {
1484 buffer o;
1485 o << "ERROR: degree of polynomial is too high: deg " << wt
1486 <<
" termwt " << tmf <<
" expectedeg " <<
this_degree
1489 }
1490 }
1491
1492 int gap, w;
1493 R->gbvector_get_lead_exponents(
_F,
p->f(), EXP);
1494 int x =
p->f()->comp;
1495 mpz_srcptr c =
p->f()->coeff.get_mpz();
1496
1498
1499
1500
1501
1502 if (w < 0 || gap > 0)
1503 {
1504 MonomialTableZZ::mon_term *t =
1506 if (t != nullptr)
1507 {
1508
1509
1510
1513 {
1514 buffer o;
1515 o <<
" swapping with GB element " << t->
_val;
1517 }
1518
1519
1520
1521
1524 {
1527 }
1528
1529 R->gbvector_replace_2by2_ZZ(
1530 _F,
_Fsyz,
p->f(),
p->fsyz(), g->g.
f, g->g.fsyz);
1531
1533
1535 {
1536 buffer o;
1537 o << " swap yielded";
1540 o << " ";
1541 R->gbvector_text_out(o,
_F,
p->f(), 3);
1544 o << " ";
1545 R->gbvector_text_out(o,
_F, g->g.
f, 3);
1547 }
1548 continue;
1549 }
1550 }
1551
1552 if (w < 0) break;
1553 if (gap > 0)
1554 {
1556 h.
f =
R->gbvector_copy(
p->x.f.f);
1557 h.
fsyz =
R->gbvector_copy(
p->x.f.fsyz);
1559 }
1561
1562 R->gbvector_reduce_lead_term_ZZ(
1566 {
1567 buffer o;
1568 o << " reducing by g" << w;
1569 o << ", yielding ";
1570 R->gbvector_text_out(o,
_F,
p->f(), 3);
1572 }
1573 if (
R->gbvector_is_zero(
p->f()))
break;
1574 if (gap > 0)
1575 {
1578 {
1579 buffer o;
1580 o <<
" deferring to degree " <<
p->deg;
1582 }
1584 return false;
1585 }
1586 }
1588 {
1589 buffer o;
1590 o << "." << count;
1592 }
1593 return true;
1594}
exponents::Exponents exponents_t
void compute_s_pair(spair *p)
void spair_text_out(buffer &o, spair *p)
void replace_gb_element_ZZ(MonomialTableZZ::mon_term *t)
void spair_set_insert(spair *p)
MonomialTableZZ * lookupZZ
const GBWeight * weightInfo_
void insert_gb(POLY f, gbelem_type minlevel)
void spair_set_defer(spair *&p)
int find_good_term_divisor_ZZ(mpz_srcptr c, exponents_t e, int x, int degf, int &result_gap)
void gb(IntermediateBasis &F, int n)
#define ALLOCATE_EXPONENTS(byte_len)
void emit_wrapped(const char *s)
void emit_line(const char *s)
References _F, _Fsyz, MonomialTableZZ::mon_term::_val, ALLOCATE_EXPONENTS, compute_s_pair(), ELEM_MINGB, ELEM_MINGEN, emit(), emit_line(), emit_wrapped(), exp_size, POLY::f, find_good_term_divisor_ZZ(), first_in_degree, POLY::fsyz, gbA::gbelem::g, gb(), insert_gb(), lookupZZ, M2_gbTrace, max_reduction_count, gbA::gbelem::minlevel, newline, p, POLY, R, replace_gb_element_ZZ(), buffer::reset(), SPAIR_GEN, spair_set_defer(), spair_set_insert(), spair_text_out(), stats_nreductions, buffer::str(), this_degree, weightInfo_, and x.
Referenced by reduceit().