Changeset cbc7e3 in git for kernel/ideals.cc
- Timestamp:
- Jun 13, 2007, 5:01:50 PM (16 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 927b7e63e6ff76d9dea1e55fced8f1c8fd41d02d
- Parents:
- 769528558a023e8c13ce1cf5f179965d3699fadf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r769528 rcbc7e3 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.4 3 2007-05-15 09:28:08Singular Exp $ */4 /* $Id: ideals.cc,v 1.44 2007-06-13 15:01:50 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 2410 2410 for (k=0;k<IDELEMS(h1);k++) h->m[k] = prCopyR( h1->m[k], origR); 2411 2411 // compute kStd 2412 #if 1 2412 2413 hh = kStd(h,NULL,hom,&w,hilb); 2413 2414 idDelete(&h); 2414 2415 #else 2416 extern ideal kGroebner(ideal F, ideal Q); 2417 hh=kGroebner(h,NULL); 2418 #endif 2415 2419 // go back to the original ring 2416 2420 rChangeCurrRing(origR); … … 2984 2988 } 2985 2989 } 2986 2990 2987 2991 if(w!=NULL) 2988 2992 pSetModDeg(NULL); 2989 2993 2990 2994 return TRUE; 2991 2995 } … … 3707 3711 ideal result=idInit(IDELEMS(xx[0]),1); 3708 3712 int i,j; 3709 poly r,h, res_p;3713 poly r,h,hh,res_p; 3710 3714 number *x=(number *)omAlloc(rl*sizeof(number)); 3711 3715 for(i=IDELEMS(result)-1;i>=0;i--) … … 3721 3725 } 3722 3726 if (r==NULL) break; 3727 h=pHead(r); 3723 3728 for(j=rl-1;j>=0;j--) 3724 3729 { 3725 h =xx[j]->m[i];3726 if ( pLmCmp(r,h)==0)3727 { 3728 x[j]=pGetCoeff(h );3729 h =pLmFreeAndNext(h);3730 xx[j]->m[i]=h ;3730 hh=xx[j]->m[i]; 3731 if ((hh!=NULL) && (pLmCmp(r,hh)==0)) 3732 { 3733 x[j]=pGetCoeff(hh); 3734 hh=pLmFreeAndNext(hh); 3735 xx[j]->m[i]=hh; 3731 3736 } 3732 3737 else … … 3738 3743 nlDelete(&(x[j]),currRing); 3739 3744 } 3740 h=pHead(r);3741 3745 pSetCoeff(h,n); 3746 //Print("new mon:");pWrite(h); 3742 3747 res_p=pAdd(res_p,h); 3743 3748 } … … 3759 3764 } 3760 3765 return idChineseRemainder(xx,q,rl); 3761 } 3766 }
Note: See TracChangeset
for help on using the changeset viewer.