Changeset da6d43a in git for Singular/dyn_modules/freealgebra/freealgebra.cc
- Timestamp:
- Jan 18, 2020, 6:16:51 PM (4 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- 7f578965e494baafcfc7703025d272601104ccb3
- Parents:
- e0abce673e2555b4ca67f152983a6c35553826e09dbae2fb591bd8d473909c90f79d3d6074c4834a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/freealgebra/freealgebra.cc
re0abce rda6d43a 136 136 static void _computeStandardWords(ideal words, int n, ideal M, int& last) 137 137 { 138 // assume <M> != <1> 138 139 if (n <= 0){ 139 140 words->m[0] = pOne(); … … 144 145 _computeStandardWords(words, n - 1, M, last); 145 146 146 int nVars = currRing->isLPring ;147 int nVars = currRing->isLPring - currRing->LPncGenCount; 147 148 148 149 for (int j = nVars - 1; j >= 0; j--) … … 158 159 } 159 160 160 int varOffset = ((n - 1) * nVars) + 1;161 int varOffset = ((n - 1) * currRing->isLPring) + 1; 161 162 pSetExp(words->m[index], varOffset + j, 1); 162 163 pSetm(words->m[index]); … … 177 178 static ideal computeStandardWords(int n, ideal M) 178 179 { 179 int nVars = currRing->isLPring ;180 int nVars = currRing->isLPring - currRing->LPncGenCount; 180 181 181 182 int maxElems = 1; … … 353 354 return -2; 354 355 } 356 if (pGetNCGen(_G->m[i]) != 0) 357 { 358 WerrorS("GK-Dim not implemented for bi-modules"); 359 return -2; 360 } 355 361 } 356 362 … … 377 383 { 378 384 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 380 387 return 0; 381 if (IDELEMS(G) == lV - 1) // V = {1} with loop388 if (IDELEMS(G) == lV - ncGenCount - 1) // V = {1} with loop 382 389 return 1; 383 if (IDELEMS(G) <= lV - 2) // V = {1} with more than one loop390 if (IDELEMS(G) <= lV - ncGenCount - 2) // V = {1} with more than one loop 384 391 return -1; 385 392 }
Note: See TracChangeset
for help on using the changeset viewer.