Changeset b147507 in git for kernel/ring.cc
- Timestamp:
- Oct 13, 2004, 12:50:37 PM (20 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- de1a82971d264aceac071d45613465890997aeb5
- Parents:
- 9f28a8bf4d221b97630205e49678195c233e099d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ring.cc
r9f28a8 rb147507 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.2 2 2004-10-12 16:16:37 SingularExp $ */4 /* $Id: ring.cc,v 1.23 2004-10-13 10:50:37 levandov Exp $ */ 5 5 6 6 /* … … 3528 3528 } 3529 3529 } 3530 3530 3531 #define rOppVar(R,I) (rVar(R)+1-I) 3531 3532 … … 3534 3535 /* that is R^opp, where f (*^opp) g = g*f */ 3535 3536 { 3536 ring save =currRing;3537 ring r=rCopy0(src);3537 ring save = currRing; 3538 ring r = rCopy0(src); 3538 3539 // change vars v1..vN -> vN..v1 3539 3540 int i; 3540 int i2 =(rVar(r)-1)/2;3541 for(i nt i=i2; i>=0; i--)3541 int i2 = (rVar(r)-1)/2; 3542 for(i=i2; i>=0; i--) 3542 3543 { 3543 3544 // index: 0..N-1 … … 3545 3546 // exchange names 3546 3547 char *p; 3547 p =r->names[rVar(r)-1-i];3548 r->names[rVar(r)-1-i] =r->names[i];3549 r->names[i] =p;3548 p = r->names[rVar(r)-1-i]; 3549 r->names[rVar(r)-1-i] = r->names[i]; 3550 r->names[i] = p; 3550 3551 } 3551 3552 // i2=(rVar(r)+1)/2; … … 3564 3565 { 3565 3566 char *p=r->names[i]; 3566 if(isupper(*p)) *p =tolower(*p);3567 else *p =toupper(*p);3567 if(isupper(*p)) *p = tolower(*p); 3568 else *p = toupper(*p); 3568 3569 } 3569 3570 // change ordering: listing … … 3609 3610 // } 3610 3611 // } 3611 // Change order/block structure a(needed for rPrint, rAdd etc.)3612 // Change order/block structures (needed for rPrint, rAdd etc.) 3612 3613 int j=0; 3613 3614 int l=rBlocks(src); … … 3725 3726 rComplete(r); 3726 3727 #ifdef RDEBUG 3727 rDebugPrint(r);3728 // rDebugPrint(r); 3728 3729 #endif 3729 3730 rTest(r); 3730 /* DO NOT CALL: rComplete(r); - it is all done */3731 3731 #ifdef HAVE_PLURAL 3732 3732 /* now, we initialize a non-comm structure on r */ … … 3738 3738 rChangeCurrRing(r); 3739 3739 /* basic nc constructions */ 3740 r->nc = (nc_struct *)omAlloc0(sizeof(nc_struct));3741 r->nc->ref = 1; /* in spite ofCopy(src)? */3740 r->nc = (nc_struct *)omAlloc0(sizeof(nc_struct)); 3741 r->nc->ref = 1; /* in spite of rCopy(src)? */ 3742 3742 r->nc->basering = r; 3743 r->nc->type = src->nc->type;3744 int *perm = (int *)omAlloc0((rVar(r)+1)*sizeof(int));3745 int *par_perm = NULL;3746 nMapFunc nMap = nSetMap(src);3743 r->nc->type = src->nc->type; 3744 int *perm = (int *)omAlloc0((rVar(r)+1)*sizeof(int)); 3745 int *par_perm = NULL; 3746 nMapFunc nMap = nSetMap(src); 3747 3747 int j; 3748 3748 int ni,nj; … … 3782 3782 { 3783 3783 ring Ropp = rOpposite(R); 3784 ring Renv =NULL;3784 ring Renv = NULL; 3785 3785 int stat = rSum(R, Ropp, Renv); 3786 if ( stat <=0)3786 if ( stat <=0 ) 3787 3787 WarnS("Error in rEnvelope at rSum"); 3788 3788 return Renv;
Note: See TracChangeset
for help on using the changeset viewer.