Changeset c81423 in git


Ignore:
Timestamp:
Aug 10, 2012, 6:48:03 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
1cf13b33d55ec9d3d521a0c38c579e836bd8400d
Parents:
e98c64edd3cf15f4e5d15991052a7bbcbb1184a5
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-10 18:48:03+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-07 04:41:47+02:00
Message:
better condition for running "m_checker.Initialize(m_syzLeads);" in SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms

add: CReducerFinder::DebugPrint() for hash output
Location:
dyn_modules/syzextra
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dyn_modules/syzextra/syzextra.cc

    re98c64 rc81423  
    619619  assume( m_syzLeads!= NULL );
    620620
    621   if (__TAILREDSYZ__ && (IDELEMS(m_syzLeads) > 0) && !__IGNORETAILS__)
     621  if (__TAILREDSYZ__ && !__IGNORETAILS__ && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)))
    622622  {
    623623    m_LS = m_syzLeads;
    624624    m_checker.Initialize(m_syzLeads);
     625#ifndef NDEBUG   
     626    if( __DEBUG__ )
     627    {
     628      const ring& r = m_rBaseRing;
     629      PrintS("SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms: \n");
     630      PrintS("m_syzLeads: \n");
     631      dPrint(m_syzLeads, r, r, 1);
     632      PrintS("m_checker.Initialize(m_syzLeads) => \n");
     633      m_checker.DebugPrint();
     634    }
     635#endif
    625636    assume( m_checker.IsNonempty() ); // TODO: this always fails... BUG????
    626637  }
     
    946957
    947958
     959#ifndef NDEBUG
     960void CReducerFinder::DebugPrint() const
     961{
     962  const ring& r = m_rBaseRing;
     963
     964  for( CReducersHash::const_iterator it = m_hash.begin(); it != m_hash.end(); it++)
     965  {
     966    Print("Hash Key: %d, Values: \n", it->first);
     967    const TReducers& reducers = it->second;
     968
     969    for(TReducers::const_iterator vit = reducers.begin(); vit != reducers.end(); vit++ )
     970    {
     971      const poly p = (*vit)->m_lt;
     972
     973      assume( p_GetComp(p, r) == it->first );
     974
     975      const int k = (*vit)->m_label;
     976
     977      assume( m_L->m[k] == p );
     978
     979      const unsigned long p_sev = (*vit)->m_sev;
     980
     981      assume( p_sev == p_GetShortExpVector(p, r) );
     982
     983      Print("L[%d]: ", k); dPrint(p, r, r, 0); Print("SEV: %dl\n", p_sev);     
     984    }
     985  }
     986}
     987#endif
     988
     989
    948990poly CReducerFinder::FindReducer(const poly product, const poly syzterm, const CReducerFinder& syz_checker) const
    949991{
  • dyn_modules/syzextra/syzextra.h

    re98c64 rc81423  
    150150    bool IsNonempty() const { return !m_hash.empty(); }
    151151
     152#ifndef NDEBUG
     153    void DebugPrint() const;
     154#endif
     155   
    152156  private:
    153157    ideal m_L; ///< only for debug
     
    191195        m_lcm(m_idLeads, setting), m_div(m_idLeads, setting), m_checker(NULL, setting)
    192196    {
    193       if( __TAILREDSYZ__ && syzLeads != NULL )
     197      if( __TAILREDSYZ__ && !__IGNORETAILS__ && syzLeads != NULL )
    194198        m_checker.Initialize(syzLeads);
    195199    }
Note: See TracChangeset for help on using the changeset viewer.