Changeset 3b7e97 in git
- Timestamp:
- Jun 27, 2008, 2:06:07 PM (16 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 86aa6a1edce194b9d6d8b5116984a276b2c0a7ec
- Parents:
- a883a37dae9ce90a24c978095e70ce11d4466058
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ring.cc
ra883a3 r3b7e97 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.8 8 2008-06-26 18:35:45 motsakExp $ */4 /* $Id: ring.cc,v 1.89 2008-06-27 12:06:07 Singular Exp $ */ 5 5 6 6 /* … … 435 435 } else 436 436 PrintS(" (NULL)"); 437 438 437 } 439 438 #endif … … 3710 3709 // WarnS("error in nc_SetupQuotient"); // cleanup? rDelete(res); return r; // just go on...? 3711 3710 } 3712 #endif 3711 #endif 3713 3712 } 3714 3713 … … 3718 3717 assume(rIsSCA(r) == rIsSCA(old_ring)); 3719 3718 assume(ncRingType(r) == ncRingType(old_ring)); 3720 #endif 3719 #endif 3721 3720 3722 3721 } 3723 3722 3724 3723 assume(currRing == r); 3725 3726 3724 3725 3727 3726 #ifdef HAVE_PLURAL 3728 3727 #if MYTEST … … 3774 3773 WarnS("error in nc_rComplete"); // cleanup?// rDelete(res);// return r; // just go on.. 3775 3774 } 3776 } 3775 } 3777 3776 assume(rIsPluralRing(r) == rIsPluralRing(res)); 3778 #endif 3777 #endif 3779 3778 } 3780 3779 return res; … … 3793 3792 { 3794 3793 pos=r->typ[i].data.dp.place; 3794 printf("no change, pos=%d\n",pos); 3795 3795 return r; 3796 3796 } 3797 3797 } 3798 3798 } 3799 ring res=rCopy 0(r, FALSE, FALSE);3799 ring res=rCopy(r); 3800 3800 i=rBlocks(r); 3801 3801 int j; 3802 3802 3803 res->order=(int *)omMemDup(r->order);3804 res->block0=(int *)omMemDup(r->block0);3805 res->block1=(int *)omMemDup(r->block1);3806 int ** wvhdl =(int **)omAlloc0(i*sizeof(int**));3807 for(j=i-1;j>=0;j--)3808 {3809 if (r->wvhdl[j] != NULL)3810 {3811 wvhdl[j] = (int*) omMemDup(r->wvhdl[j-1]);3812 }3813 }3814 res->wvhdl = wvhdl;3815 res->VarOffset=(int*)omMemDup(r->VarOffset);3816 3817 3803 res->ExpL_Size=r->ExpL_Size+1; // one word more in each monom 3818 res->CmpL_Size=r->CmpL_Size;3819 3804 res->PolyBin=omGetSpecBin(POLYSIZE + (res->ExpL_Size)*sizeof(long)); 3805 omFree((ADDRESS)res->ordsgn); 3820 3806 res->ordsgn=(long *)omAlloc0(res->ExpL_Size*sizeof(long)); 3821 3807 for(j=0;j<r->CmpL_Size;j++) … … 3824 3810 } 3825 3811 res->OrdSize=r->OrdSize+1; // one block more for pSetm 3826 res->typ=(sro_ord*)omAlloc(res->OrdSize*sizeof(sro_ord)); 3812 if (r->typ!=NULL) 3813 omFree((ADDRESS)res->typ); 3814 res->typ=(sro_ord*)omAlloc0(res->OrdSize*sizeof(sro_ord)); 3827 3815 if (r->typ!=NULL) 3828 3816 memcpy(res->typ,r->typ,r->OrdSize*sizeof(sro_ord)); 3829 // the addition lablock for pSetm: total degree at the last word3817 // the additional block for pSetm: total degree at the last word 3830 3818 // but not included in the compare part 3831 res->typ[res->OrdSize ].ord_typ=ro_dp;3832 res->typ[res->OrdSize ].data.dp.start=start_var;3833 res->typ[res->OrdSize ].data.dp.end=end_var;3834 res->typ[res->OrdSize ].data.dp.place=res->ExpL_Size-1;3819 res->typ[res->OrdSize-1].ord_typ=ro_dp; 3820 res->typ[res->OrdSize-1].data.dp.start=start_var; 3821 res->typ[res->OrdSize-1].data.dp.end=end_var; 3822 res->typ[res->OrdSize-1].data.dp.place=res->ExpL_Size-1; 3835 3823 pos=res->ExpL_Size-1; 3836 if ((start_var==1) && (end_var==res->N)) res->pOrdIndex=pos; 3824 //if ((start_var==1) && (end_var==res->N)) res->pOrdIndex=pos; 3825 extern void p_Setm_General(poly p, ring r); 3826 res->p_Setm=p_Setm_General; 3827 // ---------------------------- 3828 omFree((ADDRESS)res->p_Procs); 3829 res->p_Procs = (p_Procs_s*)omAlloc(sizeof(p_Procs_s)); 3830 p_ProcsSet(res, res->p_Procs); 3831 if (res->qideal!=NULL) id_Delete(&res->qideal,res); 3837 3832 #ifdef HAVE_PLURAL 3838 3833 if (rIsPluralRing(res)) 3839 3834 { 3835 nc_rKill(res); 3840 3836 if ( nc_rComplete(r, res, false) ) // no qideal! 3841 3837 { … … 3845 3841 } 3846 3842 #endif 3843 if (r->qideal!=NULL) res->qideal=idrCopyR_NoSort(r->qideal,r); 3847 3844 return res; 3848 3845 } … … 3945 3942 } 3946 3943 assume(rIsPluralRing(r) == rIsPluralRing(new_r)); 3947 #endif 3944 #endif 3948 3945 } 3949 3946 return new_r; … … 3974 3971 assume(rIsSCA(new_r) == rIsSCA(old_r)); 3975 3972 assume(ncRingType(new_r) == ncRingType(old_r)); 3976 #endif 3973 #endif 3977 3974 } 3978 3975 rTest(new_r); 3979 rTest(old_r); 3980 } 3976 rTest(old_r); 3977 } 3981 3978 return new_r; 3982 3979 } … … 4001 3998 } 4002 3999 assume(rIsPluralRing(new_r) == rIsPluralRing(old_r)); 4003 #endif 4000 #endif 4004 4001 rChangeCurrRing(new_r); 4005 4002 if (old_r->qideal != NULL) … … 4018 4015 assume(rIsSCA(new_r) == rIsSCA(old_r)); 4019 4016 assume(ncRingType(new_r) == ncRingType(old_r)); 4020 #endif 4017 #endif 4021 4018 } 4022 4019 rTest(new_r);
Note: See TracChangeset
for help on using the changeset viewer.