Changeset 5c0183 in git for libpolys/polys


Ignore:
Timestamp:
Feb 17, 2012, 4:44:11 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
e4f491963f9660b7e75c9817b20efcc8c5fae6fa
Parents:
98c9729eb3e7d8dbe8cbfa1932442589173c8270
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-17 16:44:11+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-23 20:35:10+01:00
Message:
fix the induced Schreyer ordering

add: a test due to Chrisian
add: enable detailed debug for the ordering
fix: bugs in induced Schreyer ordering(!?)
fix: the ordering (due to negative offset!)
File:
1 edited

Legend:

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

    r98c972 r5c0183  
    227227#ifndef NDEBUG
    228228#if MYTEST
    229           Print("p_Setm_General: isTemp ord: pos: %d, p: ", pos);  p_DebugPrint(p, r, r, 1);
     229          Print("p_Setm_General: ro_isTemp ord: pos: %d, p: ", pos);  p_DebugPrint(p, r, r, 1);
    230230#endif
    231231#endif
     
    264264#if MYTEST
    265265//          if( p->exp[o->data.isTemp.start] > 0 )
    266 //          {
    267 //            PrintS("Initial Value: "); p_DebugPrint(p, r, r, 1);
    268 //          }
     266            PrintS("after Values: "); p_DebugPrint(p, r, r, 1);
    269267#endif
    270268#endif
     
    288286          const ideal F = o->data.is.F;
    289287          const int limit = o->data.is.limit;
     288          const int start = o->data.is.start;
     289           
    290290
    291291          if( F != NULL && c > limit )
     
    294294#if MYTEST
    295295            Print("p_Setm_General: ro_is : in rSetm: pos: %d, c: %d >  limit: %d\n", c, pos, limit); // p_DebugPrint(p, r, r, 1);
     296            PrintS("preComputed Values: ");
     297            p_DebugPrint(p, r, r, 1);
    296298#endif
    297299#endif
     
    316318            if(pp == NULL) break;
    317319
    318             const int start = o->data.is.start;
    319320            const int end = o->data.is.end;
    320321
     
    326327//        const int st = o->data.isTemp.start;       
    327328
    328           if( c > limit )
     329//          if( c > limit ) // BUG???
    329330            p->exp[start] = 1;
    330331//          else
    331332//            p->exp[start] = 0;
    332333
    333              
     334
    334335#ifndef NDEBUG
    335             Print("p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start, p->exp[start]);
     336            Print("p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start, p->exp[start]);
    336337#endif       
    337    
     338
     339            // p_ExpVectorAdd(p, pp, r);
    338340
    339341            for( int i = start; i <= end; i++) // v[0] may be here...
    340342              p->exp[i] += pp->exp[i]; // !!!!!!!! ADD corresponding LT(F)
    341343
    342        
    343 
    344              
     344            // p_MemAddAdjust(p, ri);
     345            if (r->NegWeightL_Offset != NULL)
     346            {
     347              for (int i=r->NegWeightL_Size-1; i>=0; i--)
     348              {
     349                const int _i = r->NegWeightL_Offset[i];
     350                if( start <= _i && _i <= end )
     351                  p->exp[_i] -= POLY_NEGWEIGHT_OFFSET;
     352              }
     353            }
     354
     355
    345356#ifndef NDEBUG
    346357            const int* const pVarOffset = o->data.is.pVarOffset;
     
    356367            }
    357368            // TODO: how to check this for computed values???
     369#if MYTEST
     370            PrintS("Computed Values: "); p_DebugPrint(p, r, r, 1);
     371#endif
    358372#endif
    359373          } else
    360374          {
     375            p->exp[start] = 0; //!!!!????? where?????
     376             
    361377            const int* const pVarOffset = o->data.is.pVarOffset;
    362378
     
    370386#ifndef NDEBUG
    371387#if MYTEST
    372             Print("p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo, p->exp[vo]);
     388            Print("ELSE p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo, p->exp[vo]);
    373389            p_DebugPrint(p, r, r, 1);
    374 #endif       
    375 #endif       
     390#endif
     391#endif
    376392          }
    377            
    378393
    379394          break;
Note: See TracChangeset for help on using the changeset viewer.