- Timestamp:
- Jan 18, 2020, 6:16:51 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 7f578965e494baafcfc7703025d272601104ccb3
- Parents:
- e0abce673e2555b4ca67f152983a6c35553826e09dbae2fb591bd8d473909c90f79d3d6074c4834a
- Location:
- Singular
- Files:
-
- 3 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 } -
Singular/extra.cc
r9dbae2f rda6d43a 3845 3845 else 3846 3846 #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 3847 3873 /*==================== Error =================*/ 3848 3874 Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented ); -
Singular/ipassign.cc
r9dbae2f rda6d43a 2054 2054 sleftv t; 2055 2055 matrix olm = (matrix)l->Data(); 2056 intrk;2056 long rk; 2057 2057 char *pr=((map)olm)->preimage; 2058 2058 BOOLEAN module_assign=(/*l->Typ()*/ lt==MODUL_CMD); 2059 2059 matrix lm ; 2060 intnum;2060 long num; 2061 2061 int j,k; 2062 2062 int i=0; … … 2108 2108 lm->m[i]=(poly)t.CopyD(etyp); 2109 2109 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])); 2111 2111 i++; 2112 2112 } … … 2123 2123 if (module_assign) 2124 2124 { 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); 2127 2127 } 2128 2128 else 2129 j = si_min(num-i, rm->rows() *rm->cols());2129 j = si_min(num-i,(long)rm->rows() * (long)rm->cols()); 2130 2130 for(k=0;k<j;k++,i++) 2131 2131 {
Note: See TracChangeset
for help on using the changeset viewer.