Ignore:
Timestamp:
Jan 18, 2020, 6:16:51 PM (4 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
7f578965e494baafcfc7703025d272601104ccb3
Parents:
e0abce673e2555b4ca67f152983a6c35553826e09dbae2fb591bd8d473909c90f79d3d6074c4834a
Message:
Merge branch 'lpGkDimFix' into stable
File:
1 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  }
Note: See TracChangeset for help on using the changeset viewer.