1391{
1396 {
1398
1400 if(changed)
1401 {
1405 {
1408 }
1411 }
1413 }
1414
1415#define ENLARGE(pointer, type) pointer=(type*) omreallocSize(pointer, old*sizeof(type),c->array_lengths*sizeof(type))
1416
1417#define ENLARGE_ALIGN(pointer, type) {if(pointer)\
1418 pointer=(type*)omReallocSize(pointer, old*sizeof(type),c->array_lengths*sizeof(type));\
1419 else pointer=(type*)omAllocAligned(c->array_lengths*sizeof(type));}
1420
1421 int sugar;
1422 int ecart = 0;
1429 int spc = 0;
1432 {
1438
1441#ifndef HAVE_BOOST
1442#ifndef USE_STDVECBOOL
1443
1445#endif
1446#endif
1448
1450
1451
1452 }
1458 {
1460 ecart = sugar - c->
T_deg[
i];
1462 }
1464
1466
1468
1469
1470
1472 {
1474 }
1475 else
1477
1478
1481#ifdef HAVE_BOOST
1482 c->
states.push_back (dynamic_bitset <> (
i));
1483
1484#else
1485#ifdef USE_STDVECBOOL
1486
1487 c->
states.push_back (vector < bool > (
i));
1488
1489#else
1492 else
1494#endif
1495#endif
1496
1499
1500#undef ENLARGE
1501#undef ENLARGE_ALIGN
1503 {
1504 for(
j = 0;
j <
i;
j++)
1505 {
1506
1507
1508#ifndef HAVE_BOOST
1510#endif
1514
1516 {
1517
1518
1519 continue;
1520 }
1522 {
1524 }
1527
1528 {
1531 continue;
1532 }
1533 else
1536 c))
1537 {
1540
1541 }
1542
1543
1544
1546 {
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1561 {
1562
1563
1566 {
1568 }
1569 else
1570 {
1577 if(iS < 0)
1578 {
1579
1581 {
1584 }
1585 else
1587 }
1588 else
1589 {
1591 {
1592
1594 {
1597 }
1598 else
1600 }
1601 else
1604 }
1605
1606
1607 }
1608 }
1609 }
1610
1611
1614 if (
i>
j) {
s->i=
i;
s->j=
j;}
1615 else {
s->i=
j;
s->j=
i;}
1617
1619
1624
1626 {
1630
1631 }
1634
1635
1637 spc++;
1638
1639
1640
1641
1642
1643
1644 }
1645 }
1646
1648
1650
1653 int spc_final = 0;
1656 {
1658 int upper;
1660 for(upper = lower + 1; upper < spc; upper++)
1661 {
1662 if(!
pLmEqual (nodes[lower]->lcm_of_lm, nodes[upper]->lcm_of_lm))
1663 {
1664 break;
1665 }
1666 if(
has_t_rep (nodes[upper]->
i, nodes[upper]->
j, c))
1668 }
1669 upper = upper - 1;
1670 int z;
1672 for(z = 0; z < spc_final; z++)
1673 {
1675 (nodes_final[z]->lcm_of_lm, nodes[lower]->lcm_of_lm, c->
r))
1676 {
1678 break;
1679 }
1680 }
1681
1682 if(has)
1683 {
1684 for(; lower <= upper; lower++)
1685 {
1686
1687
1688 nodes[lower] =
NULL;
1689 }
1691 continue;
1692 }
1693 else
1694 {
1695 p_Test (nodes[lower]->lcm_of_lm, c->
r);
1699 nodes_final[spc_final] =
1701
1702 *(nodes_final[spc_final++]) = *(nodes[lower]);
1703
1704 nodes[lower] =
NULL;
1705 for(lower = lower + 1; lower <= upper; lower++)
1706 {
1707
1708
1709 nodes[lower] =
NULL;
1710 }
1712 continue;
1713 }
1714 }
1715
1716
1717
1718 assume (spc_final <= spc);
1721
1723
1725 {
1728 }
1729
1730
1731
1732
1734 {
1737 }
1738
1739#ifdef HAVE_PLURAL
1740
1741
1743 {
1745
1747 {
1748
1751
1753 m_iLastAltVar - m_iFirstAltVar + 1;
1754
1755
1756 poly *array_arg = (poly *)
omalloc (
N *
sizeof (poly));
1758
1759
1760 for(
unsigned short v = m_iFirstAltVar;
v <= m_iLastAltVar;
v++)
1761
1763 {
1765
1767
1770 }
1771
1773
1775 }
1776
1777 }
1778#endif
1779
1780
1781 if(!ip)
1782 {
1785
1786
1793 }
1794 {
1795 *ip = spc_final;
1796 return nodes_final;
1797 }
1798}
static int si_max(const int a, const int b)
const CanonicalForm CFMap CFMap & N
unsigned long pTotaldegree(poly p)
sorted_pair_node ** apairs
int extended_product_crit
sorted_pair_node ** tmp_spn
void introduceDelayedPairs(poly *pa, int s)
int syz_comp
array_lengths should be greater equal n;
int pTotaldegree_full(poly p)
wlen_type * weighted_lengths
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
CFArray copy(const CFList &list)
write elements of list into an array
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
static bool rIsSCA(const ring r)
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
#define __p_GetComp(p, r)
#define TEST_OPT_INTSTRATEGY
#define TEST_V_UPTORADICAL
unsigned long p_GetShortExpVector(const poly p, const ring r)
poly p_Cleardenom(poly p, const ring r)
void pEnlargeSet(poly **p, int l, int increment)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
static void p_Delete(poly *p, const ring r)
static unsigned pLength(poly a)
static poly p_Copy(poly p, const ring r)
returns a copy of p
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pHasNotCF(p1, p2)
#define pExpVectorSub(p1, p2)
#define pCopy(p)
return a copy of the poly
static short scaLastAltVar(ring r)
static short scaFirstAltVar(ring r)
static void shorten_tails(slimgb_alg *c, poly monom)
static poly gcd_of_terms(poly p, ring r)
int tgb_pair_better_gen2(const void *ap, const void *bp)
sorted_pair_node ** spn_merge(sorted_pair_node **p, int pn, sorted_pair_node **q, int qn, slimgb_alg *c)
static wlen_type pair_weighted_length(int i, int j, slimgb_alg *c)
void clean_top_of_pair_list(slimgb_alg *c)
#define ENLARGE(pointer, type)
static BOOLEAN monomial_root(poly m, ring r)
#define ENLARGE_ALIGN(pointer, type)
int kFindDivisibleByInS_easy(kStrategy strat, const red_object &obj)
static int iq_crit(const void *ap, const void *bp)
static void add_later(poly p, const char *prot, slimgb_alg *c)
static poly pOne_Special(const ring r=currRing)
static void cleanS(kStrategy strat, slimgb_alg *c)
static wlen_type pQuality(poly p, slimgb_alg *c, int l=-1)
static BOOLEAN has_t_rep(const int &arg_i, const int &arg_j, slimgb_alg *state)
static void add_to_reductors(slimgb_alg *c, poly h, int len, int ecart, BOOLEAN simplified=FALSE)
static BOOLEAN extended_product_criterion(poly p1, poly gcd1, poly p2, poly gcd2, slimgb_alg *c)