Changeset 03b1019 in git
- Timestamp:
- May 1, 2005, 9:56:36 PM (18 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- a0ddf2ce9398ab9d21db077c3aab6d162a7a76ad
- Parents:
- 1e975e5126b0e8c7606f27ce3d820fad6d693183
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ring.cc
r1e975e r03b1019 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.3 4 2005-04-29 17:35:18 SingularExp $ */4 /* $Id: ring.cc,v 1.35 2005-05-01 19:56:36 levandov Exp $ */ 5 5 6 6 /* … … 325 325 } 326 326 #ifdef HAVE_PLURAL 327 if ((r->nc!=NULL) && (r==currRing)) 328 { 329 poly pl=NULL; 330 int nl; 327 if (r->nc!=NULL) 328 { 331 329 PrintS("\n// noncommutative relations:"); 332 // Print("\n// noncommutative relations (type %d):",(int)r->nc->type); 333 for (int i = 1; i<r->N; i++) 334 { 335 for (int j = i+1; j<=r->N; j++) 336 { 337 nl=nIsOne(p_GetCoeff(MATELEM(r->nc->C,i,j),r)); 338 if ((MATELEM(r->nc->D,i,j)!=NULL)||(!nl)) 339 { 340 Print("\n// %s%s=",r->names[j-1],r->names[i-1]); 341 pl=MATELEM(r->nc->MT[UPMATELEM(i,j,r->N)],1,1); 342 pWrite0(pl); 343 } 344 } 345 } 330 if (r==currRing) 331 { 332 poly pl=NULL; 333 int nl; 334 int i,j; 335 // Print("\n// noncommutative relations (type %d):",(int)r->nc->type); 336 for (i = 1; i<r->N; i++) 337 { 338 for (j = i+1; j<=r->N; j++) 339 { 340 nl = nIsOne(p_GetCoeff(MATELEM(r->nc->C,i,j),r)); 341 if ( (MATELEM(r->nc->D,i,j)!=NULL) || (!nl) ) 342 { 343 Print("\n// %s%s=",r->names[j-1],r->names[i-1]); 344 pl = MATELEM(r->nc->MT[UPMATELEM(i,j,r->N)],1,1); 345 pWrite0(pl); 346 } 347 } 348 } 349 } 350 else PrintS(" ..."); 346 351 #ifdef PDEBUG 347 352 Print("\n// noncommutative type:%d",r->nc->type); … … 1097 1102 if ( !R1_is_nc ) nc_rCreateNCcomm(R1); 1098 1103 if ( !R2_is_nc ) nc_rCreateNCcomm(R2); 1099 /* nc types */1104 /* nc->type's */ 1100 1105 sum->nc->type = nc_undef; 1101 1106 nc_type t1 = R1->nc->type, t2 = R2->nc->type; … … 1140 1145 if (sum->nc->type == nc_undef) 1141 1146 WarnS("Error on recognizing nc types"); 1142 /* multiplication matrices */ 1143 // ring old_ring = currRing; 1144 // rChangeCurrRing(sum); 1145 /* find permutations of vars and pars */ 1147 /* multiplication matrices business: */ 1148 /* find permutations of vars and pars */ 1146 1149 int *perm1 = (int *)omAlloc0((rVar(R1)+1)*sizeof(int)); 1147 1150 int *par_perm1 = NULL; … … 1150 1153 int *par_perm2 = NULL; 1151 1154 if (rPar(R2)!=0) par_perm2=(int *)omAlloc0((rPar(R2)+1)*sizeof(int)); 1152 // maFindPerm(char **preim_names, int preim_n, char **preim_par, int preim_p,1153 // char **names, int n, char **par, int nop,1154 // int * perm, int *par_perm, int ch);1155 1155 maFindPerm(R1->names, rVar(R1), R1->parameter, rPar(R1), 1156 1156 sum->names, rVar(sum), sum->parameter, rPar(sum), … … 1207 1207 rDelete(R1); 1208 1208 rDelete(R2); 1209 /* TODO:delete perm arrays */1209 /* delete perm arrays */ 1210 1210 if (perm1!=NULL) omFree((ADDRESS)perm1); 1211 1211 if (perm2!=NULL) omFree((ADDRESS)perm2); … … 3832 3832 return r; 3833 3833 } 3834 if ( rIsPluralRing(src) ) 3834 3835 { 3835 3836 rChangeCurrRing(r); /* we were not in r */ … … 3877 3878 rChangeCurrRing(save); 3878 3879 } 3879 #endif 3880 #endif /* HAVE_PLURAL */ 3880 3881 return r; 3881 3882 } … … 3890 3891 if ( stat <=0 ) 3891 3892 WarnS("Error in rEnvelope at rSum"); 3892 /* now create the qideal for qrings */3893 // if (R->qideal != NULL)3894 // {3895 // ring save = currRing;3896 // rChangeCurrRing(Ropp);3897 // ideal Q = idCopy(R->qideal);3898 // ideal Qop = idOppose(R,Q);3899 // rChangeCurrRing(Renv);3900 // ideal Qenv = idInit(Q->ncols+Qop->ncols,1);3901 // int i;3902 // for (i=0; i< Q->ncols; i++)3903 // {3904 // Qenv->m[i] = maIMap(R,Q->m[i]);3905 // }3906 // for (i=0; i<= Qop->ncols; i++)3907 // {3908 // Qenv->m[Q->ncols+i] = maIMap(Ropp,Qop->m[i]);3909 // }3910 // /* should we run twostd on the result? */3911 // Renv->qideal = Qenv;3912 // rChangeCurrRing(save);3913 // }3914 3893 rTest(Renv); 3915 3894 return Renv;
Note: See TracChangeset
for help on using the changeset viewer.