Changeset 741464 in git


Ignore:
Timestamp:
Jan 30, 2015, 10:55:49 AM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
c9fcd5e3b1b695444030076b43c81e910fb047db
Parents:
b5396f0e7a5f63b75bd8c6911edfd4d7e1b61840
Message:
add: id_Shift
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rb5396f0 r741464  
    17611761    if (s+p_MinComp(M->m[i],currRing)<=0)
    17621762    { id_Delete(&M,currRing);return TRUE;}
    1763     p_Shift(&(M->m[i]),s,currRing);
    1764   }
    1765   M->rank += s;
     1763  }
     1764  id_Shift(M,s,currRing);
    17661765  res->data=M;
    17671766  return FALSE;
  • kernel/GBEngine/syz.cc

    rb5396f0 r741464  
    604604    if (! idIs0(res[i]))
    605605    {
    606       for (j=0; j<IDELEMS(res[i]); j++)
    607       {
    608         p_Shift(&res[i]->m[j], -rGetMaxSyzComp(i, currRing),currRing);
    609       }
     606      id_Shift(res[i],-rGetMaxSyzComp(i, currRing),currRing);
    610607    }
    611608  }
  • kernel/GBEngine/syz0.cc

    rb5396f0 r741464  
    668668              for(k=0;k<IDELEMS(result);k++) pDelete(&((*Shdl)[k]));
    669669
    670               kBucketDestroy(&(sy0buck));
     670              kBucketDestroy(&(sy0buck));
    671671              return result;
    672672            }
     
    841841}
    842842
    843 static void idShift(ideal arg,int index)
    844 {
    845   int i,j=rGetMaxSyzComp(index, currRing);
    846   for (i=0;i<IDELEMS(arg);i++)
    847   {
    848     if (arg->m[i]!=NULL)
    849       p_Shift(&arg->m[i],-j,currRing);
    850   }
    851 }
    852 
    853843#if 0 /*debug only */
    854844static void syPrintResolution(resolvente res,int start,int length)
     
    918908        if (syRing != origR)
    919909        {
    920           rChangeCurrRing(syRing);
     910          rChangeCurrRing(syRing);
    921911          for (i=0; i<IDELEMS(res[1]); i++)
    922912          {
     
    931921        if (syRing != origR)
    932922        {
    933           rChangeCurrRing(syRing);
     923          rChangeCurrRing(syRing);
    934924          for (i=0; i<IDELEMS(res[0]); i++)
    935925          {
     
    954944    while ((syzIndex < *length) && (!idIs0(res[syzIndex])))
    955945    {
    956       idShift(res[syzIndex],syzIndex);
     946      id_Shift(res[syzIndex],-rGetMaxSyzComp(syzIndex, currRing),currRing);
    957947      syzIndex++;
    958948    }
  • kernel/GBEngine/syz3.cc

    rb5396f0 r741464  
    17881788  if (rk_arg==0)
    17891789  {
    1790     for (j=0;j<IDELEMS(temp);j++)
    1791     {
    1792       if (temp->m[j]!=NULL)
    1793         p_Shift(&temp->m[j],1,currRing);
    1794     }
     1790    id_Shift(temp,1,currRing);
    17951791  }
    17961792  idSkipZeroes(temp);
     
    20031999            PrintS("Da ist was faul!!!\n");
    20042000            Print("Aber: Regularitaet %d, Grad %ld\n",
    2005                    syzstr->regularity,p_FDeg(totake[index]->m[i],currRing));
     2001                   syzstr->regularity,p_FDeg(totake[index]->m[i],currRing));
    20062002          }
    20072003        }
  • kernel/ideals.cc

    rb5396f0 r741464  
    476476  if (k == 0)
    477477  {
    478     for (j=0; j<=i; j++) p_Shift(&(h2->m[j]),1,currRing);
     478    id_Shift(h2,1,currRing);
    479479    k = 1;
    480480  }
     
    575575  {
    576576    ideal result=idFreeModule(idElemens_h1/*IDELEMS(h1)*/);
    577     int curr_syz_limit=rGetCurrSyzLimit(currRing);
    578     if (curr_syz_limit>0)
    579     for (ii=0;ii<idElemens_h1/*IDELEMS(h1)*/;ii++)
    580     {
    581       if (h1->m[ii]!=NULL)
    582         p_Shift(&h1->m[ii],curr_syz_limit,currRing);
    583     }
    584577    return result;
    585578  }
     
    772765    {
    773766      *syz=idFreeModule(IDELEMS(h1));
    774       int curr_syz_limit=rGetCurrSyzLimit(currRing);
    775       if (curr_syz_limit>0)
    776       for (int ii=0;ii<IDELEMS(h1);ii++)
    777       {
    778         if (h1->m[ii]!=NULL)
    779           p_Shift(&h1->m[ii],curr_syz_limit,currRing);
    780       }
    781767    }
    782768    return idInit(1,h1->rank);
     
    10171003  if (lsmod==0)
    10181004  {
    1019     for (j=IDELEMS(s_temp);j>0;j--)
    1020     {
    1021       if (s_temp->m[j-1]!=NULL)
    1022         p_Shift(&(s_temp->m[j-1]),1,currRing);
    1023     }
     1005    id_Shift(s_temp,1,currRing);
    10241006  }
    10251007  if (unit!=NULL)
     
    12691251      {
    12701252        p = p_Copy_noCheck(h4->m[i-1], currRing); p_Shift(&p,1,currRing);
    1271         // pTest(p);
     1253        // pTest(p);
    12721254        h4->m[i] = p;
    12731255      }
  • libpolys/polys/simpleideals.cc

    rb5396f0 r741464  
    9090    if (p!=NULL)
    9191       if (p_LmIsConstantComp(p, r) == TRUE)
    92         return k;
     92        return k;
    9393  }
    9494
     
    17341734  return result;
    17351735}
     1736
     1737void id_Shift(ideal M, int s, const ring r)
     1738{
     1739  for(int i=IDELEMS(M)-1; i>=0;i--)
     1740  {
     1741    p_Shift(&(M->m[i]),s,r);
     1742  }
     1743  M->rank += s;
     1744}
  • libpolys/polys/simpleideals.h

    rb5396f0 r741464  
    152152
    153153ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r);
     154
     155void id_Shift(ideal M, int s, const ring r);
    154156#endif
Note: See TracChangeset for help on using the changeset viewer.