Changeset 85bcd6 in git


Ignore:
Timestamp:
Aug 1, 2012, 5:21:12 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
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
Message:
added p_LmShortDivisibleByNoComp by analogy

add: also needed pDebugLmShortDivisibleByNoComp and p_LmDivisibleByNoComp (with 2 rings) for completeness
Location:
libpolys/polys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r6ce030f r85bcd6  
    16591659  return _p_LmDivisibleByNoComp(a, b, r);
    16601660}
     1661
     1662static 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
    16611669static inline BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
    16621670{
     
    16921700  return _p_LmDivisibleBy(a, r_a, b, r_b);
    16931701}
     1702
    16941703static inline BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a,
    16951704                                    poly b, unsigned long not_sev_b, const ring r)
     
    17091718#else
    17101719  return pDebugLmShortDivisibleBy(a, sev_a, r, b, not_sev_b, r);
     1720#endif
     1721}
     1722
     1723static 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);
    17111740#endif
    17121741}
  • libpolys/polys/pDebug.cc

    r6ce030f r85bcd6  
    347347static unsigned long pDivisibleBy_FALSE = 1;
    348348static unsigned long pDivisibleBy_ShortFalse = 1;
     349
    349350BOOLEAN pDebugLmShortDivisibleBy(poly p1, unsigned long sev_1, ring r_1,
    350351                               poly p2, unsigned long not_sev_2, ring r_2)
     
    370371}
    371372
     373BOOLEAN 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
    372397void pPrintDivisbleByStat()
    373398{
Note: See TracChangeset for help on using the changeset viewer.