Changeset b4ab6fb in git for Singular/iparith.cc
- Timestamp:
- May 8, 2006, 7:45:31 PM (17 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- ef8adb7b933493dbcb80792c9d08a0406bb6d8b7
- Parents:
- 54b460b5e3bb8b89e445c43cbe3540f147ea8d84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r54b460 rb4ab6fb 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.39 3 2006-05-08 15:00:38Singular Exp $ */4 /* $Id: iparith.cc,v 1.394 2006-05-08 17:45:31 Singular Exp $ */ 5 5 6 6 /* … … 2058 2058 else 2059 2059 { 2060 if ((!id HomModule(u_id,currQuotient,&w_v))2061 || (!id HomModule(v_id,currQuotient,&w_v)))2060 if ((!idTestHomModule(u_id,currQuotient,w_v)) 2061 || (!idTestHomModule(v_id,currQuotient,w_v))) 2062 2062 { 2063 2063 WarnS("wrong weights"); … … 2619 2619 if (w!=NULL) 2620 2620 { 2621 //if (!idHomModule(u_id,currQuotient,&w))2622 //{2623 //WarnS("wrong weights");2624 //w=NULL;2625 //}2626 //else2627 2628 2629 2630 2621 if (!idTestHomModule(u_id,currQuotient,w)) 2622 { 2623 WarnS("wrong weights"); 2624 w=NULL; 2625 } 2626 else 2627 { 2628 w=ivCopy(w); 2629 hom=isHomog; 2630 } 2631 2631 } 2632 2632 result=kStd(u_id,currQuotient,hom,&w,(intvec *)v->Data()); … … 2639 2639 static BOOLEAN jjSTD_1(leftv res, leftv u, leftv v) 2640 2640 { 2641 ideal result; 2641 2642 assumeStdFlag(u); 2642 ideal result; 2643 ideal u_id=(ideal)(u->Data()); 2643 ideal i1=(ideal)(u->Data()); 2644 ideal i0=idInit(1,i1->rank); 2645 i0->m[0]=(poly)v->Data(); 2646 i1=idSimpleAdd(i1,i0); 2647 i0->m[0]=NULL; 2648 idDelete(&i0); 2644 2649 intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 2645 2650 tHomog hom=testHomog; 2646 2651 if (w!=NULL) 2647 2652 { 2648 if (!idHomModule(u_id,currQuotient,&w)) 2649 { 2650 WarnS("wrong weights"); 2651 w=NULL; 2652 } 2653 else 2654 { 2655 w=ivCopy(w); 2656 hom=isHomog; 2657 } 2658 } 2659 ideal i0=idInit(1,u_id->rank); 2660 i0->m[0]=(poly)v->Data(); 2661 u_id=idSimpleAdd(u_id,i0); 2662 i0->m[0]=NULL; 2663 idDelete(&i0); 2653 if (!idTestHomModule(i1,currQuotient,w)) 2654 { 2655 // no warnung: this is legal, if i in std(i,p) 2656 // is homogeneous, but p not 2657 w=NULL; 2658 } 2659 else 2660 { 2661 w=ivCopy(w); 2662 hom=isHomog; 2663 } 2664 } 2664 2665 BITSET save_test=test; 2665 2666 test|=Sy_bit(OPT_SB_1); 2666 result=kStd( u_id,currQuotient,hom,&w,NULL,0,IDELEMS(u_id)-1);2667 result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)-1); 2667 2668 test=save_test; 2668 idDelete(& u_id);2669 idDelete(&i1); 2669 2670 idSkipZeroes(result); 2670 2671 res->data = (char *)result; … … 3763 3764 if (w!=NULL) 3764 3765 { 3765 if (!idHomModule(v_id,currQuotient,&w))3766 3767 3768 3769 }3770 else3771 {3772 w=ivCopy(w);3773 intvec **ww=&w;3774 res->data = (char *)idMinEmbedding(v_id,FALSE,ww);3775 atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD);3776 return FALSE;3777 }3778 }3779 //else // both else branches3766 if (!idTestHomModule(v_id,currQuotient,w)) 3767 { 3768 WarnS("wrong weights"); 3769 w=NULL; 3770 // and continue at the non-homog case below 3771 } 3772 else 3773 { 3774 w=ivCopy(w); 3775 intvec **ww=&w; 3776 res->data = (char *)idMinEmbedding(v_id,FALSE,ww); 3777 atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD); 3778 return FALSE; 3779 } 3780 } 3780 3781 res->data = (char *)idMinEmbedding(v_id); 3781 3782 return FALSE; … … 3868 3869 if (w!=NULL) 3869 3870 { 3870 if (!id HomModule(u_id,currQuotient,&w))3871 if (!idTestHomModule(u_id,currQuotient,w)) 3871 3872 { 3872 3873 WarnS("wrong weights"); … … 3892 3893 if (w!=NULL) 3893 3894 { 3894 if (!id HomModule(v_id,currQuotient,&w))3895 if (!idTestHomModule(v_id,currQuotient,w)) 3895 3896 { 3896 3897 WarnS("wrong weights"); … … 3899 3900 else 3900 3901 { 3902 hom=isHomog; 3901 3903 w=ivCopy(w); 3902 hom=isHomog;3903 3904 } 3904 3905 } … … 3936 3937 add_row_shift=w->min_in(); 3937 3938 (*w)-=add_row_shift; 3938 if (id HomModule(v_id,currQuotient,&w))3939 if (idTestHomModule(v_id,currQuotient,w)) 3939 3940 hom=isHomog; 3940 3941 else … … 5339 5340 if (iv!=NULL) 5340 5341 { 5341 if (!id HomModule(u_id,currQuotient,&iv))5342 if (!idTestHomModule(u_id,currQuotient,iv)) 5342 5343 { 5343 5344 WarnS("wrong weights"); … … 5383 5384 if (ww!=NULL) 5384 5385 { 5385 if (!id HomModule(u_id,currQuotient,&ww))5386 if (!idTestHomModule(u_id,currQuotient,ww)) 5386 5387 { 5387 5388 WarnS("wrong weights");
Note: See TracChangeset
for help on using the changeset viewer.