1611{
1612
1613
1614 int i, gap, newgap, egap;
1615 int n = 0;
1616
1617 (void) c;
1618 VECTOR(MonomialTableZZ::mon_term *) divisors;
1620
1621
1623 n +=
ringtableZZ->find_monomial_divisors(-1, e, 1, &divisors);
1624
1625
1626 n +=
lookupZZ->find_monomial_divisors(-1, e,
x, &divisors);
1627
1628
1629 if (n == 0) return -1;
1630 int result = divisors[0]->_val;
1632 gap = tg->gap - egap;
1633 if (gap <= 0)
1634 gap = 0;
1635 else
1636 for (i = 1; i < n; i++)
1637 {
1638 int new_val = divisors[i]->_val;
1640 newgap = tg->gap - egap;
1641 if (newgap <= 0)
1642 {
1643 gap = 0;
1645 break;
1646 }
1647 else if (newgap < gap)
1648 {
1650 gap = newgap;
1651 }
1652 }
1653 result_gap = gap;
1655}
MonomialTableZZ * lookupZZ
const GBWeight * weightInfo_
const MonomialTableZZ * ringtableZZ
void gb(IntermediateBasis &F, int n)
VALGRIND_MAKE_MEM_DEFINED & result(result)