1380{
1385 {
1387
1389 if(changed)
1390 {
1394 {
1397 }
1400 }
1402 }
1403
1404#define ENLARGE(pointer, type) pointer=(type*) omreallocSize(pointer, old*sizeof(type),c->array_lengths*sizeof(type))
1405
1406#define ENLARGE_ALIGN(pointer, type) {if(pointer)\
1407 pointer=(type*)omReallocSize(pointer, old*sizeof(type),c->array_lengths*sizeof(type));\
1408 else pointer=(type*)omAllocAligned(c->array_lengths*sizeof(type));}
1409
1410 int sugar;
1411 int ecart = 0;
1418 int spc = 0;
1421 {
1427
1430#ifndef HAVE_BOOST
1431#ifndef USE_STDVECBOOL
1432
1434#endif
1435#endif
1437
1439
1440
1441 }
1447 {
1449 ecart = sugar - c->
T_deg[
i];
1451 }
1453
1455
1457
1458
1459
1461 {
1463 }
1464 else
1466
1467
1470#ifdef HAVE_BOOST
1471 c->
states.push_back (dynamic_bitset <> (
i));
1472
1473#else
1474#ifdef USE_STDVECBOOL
1475
1476 c->
states.push_back (vector < bool > (
i));
1477
1478#else
1481 else
1483#endif
1484#endif
1485
1488
1489#undef ENLARGE
1490#undef ENLARGE_ALIGN
1492 {
1493 for(
j = 0;
j <
i;
j++)
1494 {
1495
1496
1497#ifndef HAVE_BOOST
1499#endif
1503
1505 {
1506
1507
1508 continue;
1509 }
1511 {
1513 }
1516
1517 {
1520 continue;
1521 }
1522 else
1525 c))
1526 {
1529
1530 }
1531
1532
1533
1535 {
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1550 {
1551
1552
1555 {
1557 }
1558 else
1559 {
1566 if(iS < 0)
1567 {
1568
1570 {
1573 }
1574 else
1576 }
1577 else
1578 {
1580 {
1581
1583 {
1586 }
1587 else
1589 }
1590 else
1593 }
1594
1595
1596 }
1597 }
1598 }
1599
1600
1603 if (
i>
j) {
s->i=
i;
s->j=
j;}
1604 else {
s->i=
j;
s->j=
i;}
1606
1608
1613
1615 {
1619
1620 }
1623
1624
1626 spc++;
1627
1628
1629
1630
1631
1632
1633 }
1634 }
1635
1637
1639
1642 int spc_final = 0;
1645 {
1647 int upper;
1649 for(upper = lower + 1; upper < spc; upper++)
1650 {
1651 if(!
pLmEqual (nodes[lower]->lcm_of_lm, nodes[upper]->lcm_of_lm))
1652 {
1653 break;
1654 }
1655 if(
has_t_rep (nodes[upper]->
i, nodes[upper]->
j, c))
1657 }
1658 upper = upper - 1;
1659 int z;
1661 for(z = 0; z < spc_final; z++)
1662 {
1664 (nodes_final[z]->lcm_of_lm, nodes[lower]->lcm_of_lm, c->
r))
1665 {
1667 break;
1668 }
1669 }
1670
1671 if(has)
1672 {
1673 for(; lower <= upper; lower++)
1674 {
1675
1676
1677 nodes[lower] =
NULL;
1678 }
1680 continue;
1681 }
1682 else
1683 {
1684 p_Test (nodes[lower]->lcm_of_lm, c->
r);
1688 nodes_final[spc_final] =
1690
1691 *(nodes_final[spc_final++]) = *(nodes[lower]);
1692
1693 nodes[lower] =
NULL;
1694 for(lower = lower + 1; lower <= upper; lower++)
1695 {
1696
1697
1698 nodes[lower] =
NULL;
1699 }
1701 continue;
1702 }
1703 }
1704
1705
1706
1707 assume (spc_final <= spc);
1710
1712
1714 {
1717 }
1718
1719
1720
1721
1723 {
1726 }
1727
1728#ifdef HAVE_PLURAL
1729
1730
1732 {
1734
1736 {
1737
1740
1742 m_iLastAltVar - m_iFirstAltVar + 1;
1743
1744
1745 poly *array_arg = (poly *)
omalloc (
N *
sizeof (poly));
1747
1748
1749 for(
unsigned short v = m_iFirstAltVar;
v <= m_iLastAltVar;
v++)
1750
1752 {
1754
1756
1759 }
1760
1762
1764 }
1765
1766 }
1767#endif
1768
1769
1770 if(!ip)
1771 {
1774
1775
1782 }
1783 {
1784 *ip = spc_final;
1785 return nodes_final;
1786 }
1787}
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 int pLength(poly a)
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 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)