Changeset 85bcd6 in git for libpolys/polys
- Timestamp:
- Aug 1, 2012, 5:21:12 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d828d633862fd9b6ec0e9f7b7e95dc3d610527d0fcb5bfd57f91ed4e8f9022cad3b9a32ee509c968
- Parents:
- 6ce030f7be001f1ad6bba7026beec10e5beac410
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-01 17:21:12+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-01 19:55:33+02:00
- Location:
- libpolys/polys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.h
r6ce030f r85bcd6 1659 1659 return _p_LmDivisibleByNoComp(a, b, r); 1660 1660 } 1661 1662 static inline BOOLEAN p_LmDivisibleByNoComp(poly a, const ring ra, poly b, const ring rb) 1663 { 1664 p_LmCheckPolyRing1(a, ra); 1665 p_LmCheckPolyRing1(b, rb); 1666 return _p_LmDivisibleByNoComp(a, ra, b, rb); 1667 } 1668 1661 1669 static inline BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r) 1662 1670 { … … 1692 1700 return _p_LmDivisibleBy(a, r_a, b, r_b); 1693 1701 } 1702 1694 1703 static inline BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, 1695 1704 poly b, unsigned long not_sev_b, const ring r) … … 1709 1718 #else 1710 1719 return pDebugLmShortDivisibleBy(a, sev_a, r, b, not_sev_b, r); 1720 #endif 1721 } 1722 1723 static inline BOOLEAN p_LmShortDivisibleByNoComp(poly a, unsigned long sev_a, 1724 poly b, unsigned long not_sev_b, const ring r) 1725 { 1726 p_LmCheckPolyRing1(a, r); 1727 p_LmCheckPolyRing1(b, r); 1728 #ifndef PDIV_DEBUG 1729 _pPolyAssume2(p_GetShortExpVector(a, r) == sev_a, a, r); 1730 _pPolyAssume2(p_GetShortExpVector(b, r) == ~ not_sev_b, b, r); 1731 1732 if (sev_a & not_sev_b) 1733 { 1734 pAssume1(p_LmDivisibleByNoComp(a, b, r) == FALSE); 1735 return FALSE; 1736 } 1737 return p_LmDivisibleByNoComp(a, b, r); 1738 #else 1739 return pDebugLmShortDivisibleByNoComp(a, sev_a, r, b, not_sev_b, r); 1711 1740 #endif 1712 1741 } -
libpolys/polys/pDebug.cc
r6ce030f r85bcd6 347 347 static unsigned long pDivisibleBy_FALSE = 1; 348 348 static unsigned long pDivisibleBy_ShortFalse = 1; 349 349 350 BOOLEAN pDebugLmShortDivisibleBy(poly p1, unsigned long sev_1, ring r_1, 350 351 poly p2, unsigned long not_sev_2, ring r_2) … … 370 371 } 371 372 373 BOOLEAN pDebugLmShortDivisibleByNoComp(poly p1, unsigned long sev_1, ring r_1, 374 poly p2, unsigned long not_sev_2, ring r_2) 375 { 376 // _pPolyAssume((p_GetComp(p1, r_1) == p_GetComp(p2, r_2)) || (p_GetComp(p1, r_1) == 0)); 377 _pPolyAssume(p_GetShortExpVector(p1, r_1) == sev_1, p1, r_1); 378 _pPolyAssume(p_GetShortExpVector(p2, r_2) == ~ not_sev_2, p2, r_2); 379 380 pDivisibleBy_number++; 381 BOOLEAN ret; 382 if (r_1 == r_2) 383 ret = p_LmDivisibleByNoComp(p1, p2, r_1); 384 else 385 ret = p_LmDivisibleByNoComp(p1, r_1, p2, r_2); 386 387 if (! ret) pDivisibleBy_FALSE++; 388 if (sev_1 & not_sev_2) 389 { 390 pDivisibleBy_ShortFalse++; 391 if (ret) 392 dReportError("p1 divides p2, but sev's are wrong"); 393 } 394 return ret; 395 } 396 372 397 void pPrintDivisbleByStat() 373 398 {
Note: See TracChangeset
for help on using the changeset viewer.