Changeset da6d43a in git for Singular


Ignore:
Timestamp:
Jan 18, 2020, 6:16:51 PM (4 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7f578965e494baafcfc7703025d272601104ccb3
Parents:
e0abce673e2555b4ca67f152983a6c35553826e09dbae2fb591bd8d473909c90f79d3d6074c4834a
Message:
Merge branch 'lpGkDimFix' into stable
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/freealgebra/freealgebra.cc

    re0abce rda6d43a  
    136136static void _computeStandardWords(ideal words, int n, ideal M, int& last)
    137137{
     138  // assume <M> != <1>
    138139  if (n <= 0){
    139140    words->m[0] = pOne();
     
    144145  _computeStandardWords(words, n - 1, M, last);
    145146
    146   int nVars = currRing->isLPring;
     147  int nVars = currRing->isLPring - currRing->LPncGenCount;
    147148
    148149  for (int j = nVars - 1; j >= 0; j--)
     
    158159        }
    159160
    160         int varOffset = ((n - 1) * nVars) + 1;
     161        int varOffset = ((n - 1) * currRing->isLPring) + 1;
    161162        pSetExp(words->m[index], varOffset + j, 1);
    162163        pSetm(words->m[index]);
     
    177178static ideal computeStandardWords(int n, ideal M)
    178179{
    179   int nVars = currRing->isLPring;
     180  int nVars = currRing->isLPring - currRing->LPncGenCount;
    180181
    181182  int maxElems = 1;
     
    353354      return -2;
    354355    }
     356    if (pGetNCGen(_G->m[i]) != 0)
     357    {
     358      WerrorS("GK-Dim not implemented for bi-modules");
     359      return -2;
     360    }
    355361  }
    356362
     
    377383  {
    378384    int lV = currRing->isLPring;
    379     if (IDELEMS(G) == lV) // V = {1} no edges
     385    int ncGenCount = currRing->LPncGenCount;
     386    if (IDELEMS(G) == lV - ncGenCount) // V = {1} no edges
    380387      return 0;
    381     if (IDELEMS(G) == lV - 1) // V = {1} with loop
     388    if (IDELEMS(G) == lV - ncGenCount - 1) // V = {1} with loop
    382389      return 1;
    383     if (IDELEMS(G) <= lV - 2) // V = {1} with more than one loop
     390    if (IDELEMS(G) <= lV - ncGenCount - 2) // V = {1} with more than one loop
    384391      return -1;
    385392  }
  • Singular/extra.cc

    r9dbae2f rda6d43a  
    38453845    else
    38463846#endif
     3847/* ====== maEvalAt ============================*/
     3848    if(strcmp(sys_cmd,"evaluate")==0)
     3849    {
     3850      extern number maEvalAt(const poly p,const number* pt, const ring r);
     3851      if (h->Typ()!=POLY_CMD)
     3852      {
     3853        WerrorS("expected system(\"evaluate\",<poly>,..)");
     3854        return TRUE;
     3855      }
     3856      poly p=(poly)h->Data();
     3857      number *pt=(number*)omAlloc(sizeof(number)*currRing->N);
     3858      for(int i=0;i<currRing->N;i++)
     3859      {
     3860        h=h->next;
     3861        if ((h==NULL)||(h->Typ()!=NUMBER_CMD))
     3862        {
     3863          WerrorS("system(\"evaluate\",<poly>,<number>..) - expect number");
     3864          return TRUE;
     3865        }
     3866        pt[i]=(number)h->Data();
     3867      }
     3868      res->data=maEvalAt(p,pt,currRing);
     3869      res->rtyp=NUMBER_CMD;
     3870      return FALSE;
     3871    }
     3872    else
    38473873/*==================== Error =================*/
    38483874      Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented );
  • Singular/ipassign.cc

    r9dbae2f rda6d43a  
    20542054      sleftv t;
    20552055      matrix olm = (matrix)l->Data();
    2056       int rk;
     2056      long rk;
    20572057      char *pr=((map)olm)->preimage;
    20582058      BOOLEAN module_assign=(/*l->Typ()*/ lt==MODUL_CMD);
    20592059      matrix lm ;
    2060       int  num;
     2060      long  num;
    20612061      int j,k;
    20622062      int i=0;
     
    21082108            lm->m[i]=(poly)t.CopyD(etyp);
    21092109            pNormalize(lm->m[i]);
    2110             if (module_assign) rk=si_max(rk,(int)pMaxComp(lm->m[i]));
     2110            if (module_assign) rk=si_max(rk,pMaxComp(lm->m[i]));
    21112111            i++;
    21122112          }
     
    21232123            if (module_assign)
    21242124            {
    2125               j = si_min(num,rm->cols());
    2126               rk=si_max(rk,(int)rm->rank);
     2125              j = si_min((int)num,rm->cols());
     2126              rk=si_max(rk,rm->rank);
    21272127            }
    21282128            else
    2129               j = si_min(num-i,rm->rows() * rm->cols());
     2129              j = si_min(num-i,(long)rm->rows() * (long)rm->cols());
    21302130            for(k=0;k<j;k++,i++)
    21312131            {
Note: See TracChangeset for help on using the changeset viewer.