Changeset 55e6b0 in git
- Timestamp:
- Nov 30, 2014, 3:23:34 AM (9 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- 80478a3a86d08f6bb8b5675c8c993cd57e0b9c47
- Parents:
- 0ab2c4c1fc27408db639cea5d0dd682f902463b4
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-11-30 03:23:34+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-11-30 03:26:49+01:00
- Location:
- Singular/dyn_modules/syzextra
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/syzextra/syzextra.cc
r0ab2c4c r55e6b0 451 451 452 452 453 static FORCE_INLINE poly myp_Head(const poly p, const ring r) 454 { 455 p_Test(p,r); 456 const poly pp = p_Head(p, r); 457 p_Test(pp,r); 458 return pp; 453 static FORCE_INLINE poly myp_Head(const poly p, const bool bIgnoreCoeff, const ring r) 454 { 455 assume( p != NULL ); p_LmCheckPolyRing1(p, r); 456 457 poly np; omTypeAllocBin(poly, np, r->PolyBin); 458 p_SetRingOfLm(np, r); 459 memcpy(np->exp, p->exp, r->ExpL_Size*sizeof(long)); 460 pNext(np) = NULL; 461 pSetCoeff0(np, (bIgnoreCoeff)? NULL : n_Copy(pGetCoeff(p), r->cf)); 462 463 p_LmCheckPolyRing1(np, r); 464 return np; 459 465 } 460 466 … … 1578 1584 // }; 1579 1585 1580 1581 1586 1582 1587 bool my_p_LmCmp (poly a, poly b, const ring r) { return p_LmCmp(a, b, r) == -1; } // TODO: change to simple lex. memory compare! 1583 1588 1584 1589 // NOTE: need p_Copy?????? for image + multiplier!!??? … … 1615 1620 assume( p_LmEqual(itr->first, multiplier, r) ); 1616 1621 1617 if( itr->second == NULL ) 1622 if( itr->second == NULL ) // leadcoeff plays no role if value is NULL! 1618 1623 return (NULL); 1619 1624 … … 1684 1689 p_Test(multiplier, r); 1685 1690 1686 T.insert( TP2PCache::value_type(myp_Head(multiplier, r), p) ); // T[ multiplier ] = p;1691 T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) ); // T[ multiplier ] = p; 1687 1692 1688 1693 p_Test(multiplier, r); … … 1714 1719 if( UNLIKELY( __PROT__ ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1); 1715 1720 1716 T.insert( TP2PCache::value_type( p_Copy(multiplier, r), p) );1721 T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) ); 1717 1722 1718 1723 m_cache.insert( TCache::value_type(tail, T) ); … … 2041 2046 m_sev( p_GetShortExpVector(_lt, R) ), m_label( _label ), m_lt( _lt ) 2042 2047 #ifndef SING_NDEBUG 2043 , _R(R), m_lt_copy( myp_Head(_lt, R) )2048 , _R(R), m_lt_copy( myp_Head(_lt, true, R) ) // note that p_LmEqual only tests exponents! 2044 2049 #endif 2045 2050 { -
Singular/dyn_modules/syzextra/syzextra.h
r0ab2c4c r55e6b0 37 37 #endif 38 38 39 // set to 1 if all leading coeffs are assumed to be all =1... 39 // set to 1 if all leading coeffs are assumed to be all =1... 40 // note the use of simplify on input in SSinit! 40 41 #ifndef NODIVISION 41 42 # define NODIVISION 1
Note: See TracChangeset
for help on using the changeset viewer.