1428{
1433 {
1435
1437 if(changed)
1438 {
1442 {
1445 }
1448 }
1450 }
1451
1452#define ENLARGE(pointer, type) pointer=(type*) omrealloc(pointer, c->array_lengths*sizeof(type))
1453
1454#define ENLARGE_ALIGN(pointer, type) {if(pointer)\
1455 pointer=(type*)omReallocAligned(pointer, c->array_lengths*sizeof(type));\
1456 else pointer=(type*)omAllocAligned(c->array_lengths*sizeof(type));}
1457
1458 int sugar;
1459 int ecart = 0;
1466 int spc = 0;
1468 {
1474
1477#ifndef HAVE_BOOST
1478#ifndef USE_STDVECBOOL
1479
1481#endif
1482#endif
1484
1486
1487
1488 }
1494 {
1496 ecart = sugar - c->
T_deg[
i];
1498 }
1500
1502
1504
1505
1506
1508 {
1510 }
1511 else
1513
1514
1517#ifdef HAVE_BOOST
1518 c->
states.push_back (dynamic_bitset <> (
i));
1519
1520#else
1521#ifdef USE_STDVECBOOL
1522
1523 c->
states.push_back (vector < bool > (
i));
1524
1525#else
1528 else
1530#endif
1531#endif
1532
1535
1536#undef ENLARGE
1537#undef ENLARGE_ALIGN
1539 {
1540 for(
j = 0;
j <
i;
j++)
1541 {
1542
1543
1544#ifndef HAVE_BOOST
1546#endif
1550
1552 {
1553
1554
1555 continue;
1556 }
1558 {
1560 }
1563
1564 {
1567 continue;
1568 }
1569 else
1572 c))
1573 {
1576
1577 }
1578
1579
1580
1582 {
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1597 {
1598
1599
1602 {
1604 }
1605 else
1606 {
1613 if(iS < 0)
1614 {
1615
1617 {
1620 }
1621 else
1623 }
1624 else
1625 {
1627 {
1628
1630 {
1633 }
1634 else
1636 }
1637 else
1640 }
1641
1642
1643 }
1644 }
1645 }
1646
1647
1654
1656
1661
1663 {
1667
1668 }
1671
1672
1674 spc++;
1675
1676
1677
1678
1679
1680
1681 }
1682 }
1683
1685
1687
1690 int spc_final = 0;
1693 {
1695 int upper;
1697 for(upper = lower + 1; upper < spc; upper++)
1698 {
1699 if(!
pLmEqual (nodes[lower]->lcm_of_lm, nodes[upper]->lcm_of_lm))
1700 {
1701 break;
1702 }
1703 if(
has_t_rep (nodes[upper]->
i, nodes[upper]->
j, c))
1705 }
1706 upper = upper - 1;
1707 int z;
1709 for(z = 0; z < spc_final; z++)
1710 {
1712 (nodes_final[z]->lcm_of_lm, nodes[lower]->lcm_of_lm, c->
r))
1713 {
1715 break;
1716 }
1717 }
1718
1719 if(has)
1720 {
1721 for(; lower <= upper; lower++)
1722 {
1723
1724
1725 nodes[lower] =
NULL;
1726 }
1728 continue;
1729 }
1730 else
1731 {
1732 p_Test (nodes[lower]->lcm_of_lm, c->
r);
1736 nodes_final[spc_final] =
1738
1739 *(nodes_final[spc_final++]) = *(nodes[lower]);
1740
1741 nodes[lower] =
NULL;
1742 for(lower = lower + 1; lower <= upper; lower++)
1743 {
1744
1745
1746 nodes[lower] =
NULL;
1747 }
1749 continue;
1750 }
1751 }
1752
1753
1754
1755 assume (spc_final <= spc);
1758
1760
1762 {
1765 }
1766
1767
1768
1769
1771 {
1774 }
1775
1776#ifdef HAVE_PLURAL
1777
1778
1780 {
1782
1784 {
1785
1788
1790 m_iLastAltVar - m_iFirstAltVar + 1;
1791
1792
1793 poly *array_arg = (poly *)
omalloc (
N *
sizeof (poly));
1795
1796
1797 for(
unsigned short v = m_iFirstAltVar;
v <= m_iLastAltVar;
v++)
1798
1800 {
1802
1804
1807 }
1808
1810
1812 }
1813
1814 }
1815#endif
1816
1817
1818 if(!ip)
1819 {
1822
1823
1830 }
1831 {
1832 *ip = spc_final;
1833 return nodes_final;
1834 }
1835}
static int si_max(const int a, const int b)
static int si_min(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)
void pNorm(poly p, const ring R=currRing)
#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)
static int add_to_reductors(slimgb_alg *c, poly h, int len, int ecart, BOOLEAN simplified=FALSE)
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 BOOLEAN extended_product_criterion(poly p1, poly gcd1, poly p2, poly gcd2, slimgb_alg *c)