Changeset c4279b in git


Ignore:
Timestamp:
Dec 13, 2013, 10:03:59 AM (10 years ago)
Author:
Christian Eder
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
Children:
55233bec0f99f7b6752ebfe613d9ada501e0d441
Parents:
d11734c14946aacc7d00348d000a1bb22c618823
Message:
fixes ring changes for degree-index-order in sba
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    rd11734 rc4279b  
    21642164              p_ExpVectorAdd(help,strat->S[pos],currRing);
    21652165              Q.sig = p_Add_q(Q.sig,help,currRing);
    2166               if (p_LmCmp(Q.sig,strat->syz[strat->syzl-1],currRing) == -currRing->OrdSgn) {
     2166              if (strat->sbaOrder == 0) {
     2167                if (p_LmCmp(Q.sig,strat->syz[strat->syzl-1],currRing) == -currRing->OrdSgn) {
     2168                  pos = posInSyz(strat, Q.sig);
     2169                  enterSyz(Q, strat, pos);
     2170                }
     2171              } else {
    21672172                pos = posInSyz(strat, Q.sig);
    21682173                enterSyz(Q, strat, pos);
  • kernel/kutil.cc

    rd11734 rc4279b  
    83038303      return r;
    83048304    }
    8305     ring res = rCopy0(r, FALSE, TRUE);
    8306     for (int i=1; i<n-1; i++)
    8307     {
    8308       res->order[i] = res->order[i-1];
    8309       res->block0[i] = res->block0[i-1];
    8310       res->block1[i] = res->block1[i-1];
    8311       res->wvhdl[i] = res->wvhdl[i-1];
     8305    ring res = rCopy0(r, TRUE, FALSE);
     8306    res->order  = (int *)omAlloc0((n+1)*sizeof(int));
     8307    res->block0 = (int *)omAlloc0((n+1)*sizeof(int));
     8308    res->block1 = (int *)omAlloc0((n+1)*sizeof(int));
     8309    int **wvhdl = (int **)omAlloc0((n+1)*sizeof(int*));
     8310    res->wvhdl  = wvhdl;
     8311    for (int i=1; i<n; i++)
     8312    {
     8313      res->order[i]   = r->order[i-1];
     8314      res->block0[i]  = r->block0[i-1];
     8315      res->block1[i]  = r->block1[i-1];
     8316      res->wvhdl[i]   = r->wvhdl[i-1];
    83128317    }
    83138318
    83148319    // new 1st block
    83158320    res->order[0]   = ringorder_C; // Prefix
    8316     //res->block0[0]  = 1;
    8317     //res->block1[0]  = res->N;
    8318     //res->wvhdl[j]   = NULL;
    8319     // res->order [j] = 0; // The End!
     8321    // removes useless secondary component order if defined in old ring
     8322    for (int i=rBlocks(res); i>0; --i) {
     8323      if (res->order[i] == ringorder_C || res->order[i] == ringorder_c) {
     8324        res->order[i] = 0;
     8325        break;
     8326      }
     8327    }
    83208328    rComplete(res, 1);
    83218329#ifdef HAVE_PLURAL
     
    83428350  if (strat->sbaOrder == 3)
    83438351  {
    8344     printf("hh\n");
    8345     ring res = rCopy0(r, FALSE, TRUE);
    8346     for (int i=2; i<n; i++)
    8347     {
    8348       printf("i %d\n",i);
    8349       res->order[i] = res->order[i-2];
    8350       res->block0[i] = res->block0[i-2];
    8351       res->block1[i] = res->block1[i-2];
    8352       res->wvhdl[i] = res->wvhdl[i-2];
    8353     }
    8354     printf("hh2\n");
     8352    ring res = rCopy0(r, TRUE, FALSE);
     8353    res->order  = (int *)omAlloc0((n+2)*sizeof(int));
     8354    res->block0 = (int *)omAlloc0((n+2)*sizeof(int));
     8355    res->block1 = (int *)omAlloc0((n+2)*sizeof(int));
     8356    int **wvhdl = (int **)omAlloc0((n+2)*sizeof(int*));
     8357    res->wvhdl  = wvhdl;
     8358    for (int i=2; i<n+2; i++)
     8359    {
     8360      res->order[i]   = r->order[i-2];
     8361      res->block0[i]  = r->block0[i-2];
     8362      res->block1[i]  = r->block1[i-2];
     8363      res->wvhdl[i]   = r->wvhdl[i-2];
     8364    }
    83558365
    83568366    // new 1st block
     
    83608370    for (int i=0; i<res->N; ++i)
    83618371      res->wvhdl[0][i]  = 1;
    8362     res->block1[0]  = si_min(1+res->N, rVar(res));
    8363 
     8372    res->block1[0]  = si_min(res->N, rVar(res));
    83648373    // new 2nd block
    83658374    res->order[1]   = ringorder_C; // Prefix
    8366     res->block0[1]  = 1;
    8367     res->block1[1]  = res->N;
    8368     //res->wvhdl[j]   = NULL;
    8369     // res->order [j] = 0; // The End!
     8375    res->wvhdl[1]   = NULL;
     8376    // removes useless secondary component order if defined in old ring
     8377    for (int i=rBlocks(res); i>0; --i) {
     8378      if (res->order[i] == ringorder_C || res->order[i] == ringorder_c) {
     8379        res->order[i] = 0;
     8380        break;
     8381      }
     8382    }
    83708383    rComplete(res, 1);
    83718384#ifdef HAVE_PLURAL
Note: See TracChangeset for help on using the changeset viewer.