Changeset b158b77 in git
- Timestamp:
- Aug 15, 2014, 7:30:57 PM (10 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 7e57e1137da523924bcff7f5387d9b00e599679a8664f3a2ab7076c6ef0da4380e7c25276945221f
- Parents:
- 9da0b07b27964cfe1c3008ebfe22189d1d052727
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r9da0b0 rb158b77 1568 1568 /* the last block: everything is 0 */ 1569 1569 r->order[2] = 0; 1570 /*polynomial ring*/1571 r->OrdSgn = 1;1572 1570 1573 1571 /* complete ring intializations */ … … 2307 2305 R->order[j] = (int) ringorder_unspec; 2308 2306 // orderings 2309 R->OrdSgn=1;2310 2307 for(j=0;j<n-1;j++) 2311 2308 { -
libpolys/polys/monomials/ring.cc
r9da0b0 rb158b77 134 134 r->block0 = block0; 135 135 r->block1 = block1; 136 /*polynomial ring*/137 r->OrdSgn = 1;138 136 139 137 /* complete ring intializations */ … … 2825 2823 /* the last block: everything is 0 */ 2826 2824 res->order[2] = 0; 2827 /*polynomial ring*/2828 res->OrdSgn = 1;2829 2825 2830 2826 //int tmpref=r->cf->ref; … … 3360 3356 r->ExpPerLong = BIT_SIZEOF_LONG / bits; 3361 3357 r->divmask=rGetDivMask(bits); 3358 if (r->OrdSgn!=-1) r->OrdSgn=1; //rCheckOrdSgn will changed that, if needed 3362 3359 3363 3360 // will be used for ordsgn: … … 3751 3748 } 3752 3749 3753 static void rCheckOrdSgn(ring r,int i/*current block*/) 3754 { // set r->OrdSgn 3755 int jj; 3756 int oo=-1; 3757 int notfound=1; 3758 for(jj=i-1;jj>=0;jj--) 3759 { 3760 if(((r->order[jj]==ringorder_a) 3761 ||(r->order[jj]==ringorder_aa) 3762 ||(r->order[jj]==ringorder_a64)) 3763 &&(r->block0[jj]<=r->block0[i]) 3764 &&(r->block1[jj]>=r->block1[i])) 3765 { 3766 int res=1; 3767 if (r->order[jj]!=ringorder_a64) 3768 { 3769 for(int j=r->block1[jj]-r->block0[jj]; j>=0;j--) 3750 static void rCheckOrdSgn(ring r,int b/*current block*/) 3751 { // set r->OrdSgn, return, if already checked 3752 if (r->OrdSgn==-1) return; 3753 // for each variable: 3754 for(int i=1;i<=r->N;i++) 3755 { 3756 int found=0; 3757 // for all blocks: 3758 for(int j=0;(j<=b) && (found==0);j++) 3759 { 3760 // search the first block containing var(i) 3761 if ((r->block0[j]<=i)&&(r->block1[j]>=i)) 3762 { 3763 // what kind if block is it? 3764 if ((r->order[j]==ringorder_ls) 3765 || (r->order[j]==ringorder_ds) 3766 || (r->order[j]==ringorder_Ds) 3767 || (r->order[j]==ringorder_ws) 3768 || (r->order[j]==ringorder_Ws) 3769 || (r->order[j]==ringorder_rs)) 3770 3770 { 3771 if(r->wvhdl[jj][j]<=0) { res=-1; break;} 3772 } 3773 } 3774 oo=res; 3775 notfound=0; 3776 } 3777 r->OrdSgn=oo; 3778 } 3779 if (notfound 3780 && ((r->order[i]==ringorder_ls) 3781 || (r->order[i]==ringorder_ds) 3782 || (r->order[i]==ringorder_Ds) 3783 || (r->order[i]==ringorder_ws) 3784 || (r->order[i]==ringorder_Ws) 3785 || (r->order[i]==ringorder_rs)) 3786 ) 3787 r->OrdSgn=-1; 3788 } 3789 3771 r->OrdSgn=-1; 3772 return; 3773 } 3774 if((r->order[j]==ringorder_a) 3775 ||(r->order[j]==ringorder_aa)) 3776 { 3777 // <0: local/mixed ordering return 3778 // >0: var(i) is okay, look at other vars 3779 // ==0: look at other blocks for var(i) 3780 if(r->wvhdl[j][i-r->block0[j]]<0) { r->OrdSgn=-1; return;} 3781 if(r->wvhdl[j][i-r->block0[j]]>0) { found=1; break;} 3782 } 3783 } 3784 } 3785 } 3786 // no local var found in 1..N: 3787 //r->OrdSgn=1; 3788 } 3790 3789 3791 3790 void rUnComplete(ring r) … … 4697 4696 res->block1[0] = r->N; 4698 4697 } 4699 // HANNES: This sould be set in rComplete4700 res->OrdSgn = 1;4701 4698 rComplete(res, 1); 4702 4699 #ifdef HAVE_PLURAL
Note: See TracChangeset
for help on using the changeset viewer.