Changeset cfbcdce in git
 Timestamp:
 May 8, 2006, 3:28:10 PM (17 years ago)
 Branches:
 (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
 Children:
 4f0a5a7540e7e15b498f2c22ed22d461c02444f6
 Parents:
 fa98a4f5c478760aa9bbf122228fe2c21c16173c
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/iparith.cc
rfa98a4 rcfbcdce 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.39 0 20060306 14:11:19Singular Exp $ */4 /* $Id: iparith.cc,v 1.391 20060508 13:28:10 Singular Exp $ */ 5 5 6 6 /* … … 2616 2616 intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 2617 2617 tHomog hom=testHomog; 2618 ideal u_id=(ideal)(u>Data()); 2618 2619 if (w!=NULL) 2619 2620 { 2620 w=ivCopy(w); 2621 hom=isHomog; 2622 } 2623 result=kStd((ideal)(u>Data()),currQuotient,hom,&w,(intvec *)v>Data()); 2621 if (!idHomModule(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 } 2632 result=kStd(u_id,currQuotient,hom,&w,(intvec *)v>Data()); 2624 2633 idSkipZeroes(result); 2625 2634 res>data = (char *)result; … … 2632 2641 assumeStdFlag(u); 2633 2642 ideal result; 2643 ideal u_id=(ideal)(u>Data()); 2634 2644 intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 2635 2645 tHomog hom=testHomog; 2636 2646 if (w!=NULL) 2637 2647 { 2638 w=ivCopy(w); 2639 hom=isHomog; 2640 } 2641 ideal i1=(ideal)u>Data(); 2642 ideal i0=idInit(1,i1>rank); 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); 2643 2660 i0>m[0]=(poly)v>Data(); 2644 i1=idSimpleAdd(i1,i0);2661 u_id=idSimpleAdd(u_id,i0); 2645 2662 i0>m[0]=NULL; 2646 2663 idDelete(&i0); 2647 2664 BITSET save_test=test; 2648 2665 test=Sy_bit(OPT_SB_1); 2649 result=kStd( i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)1);2666 result=kStd(u_id,currQuotient,hom,&w,NULL,0,IDELEMS(u_id)1); 2650 2667 test=save_test; 2651 idDelete(& i1);2668 idDelete(&u_id); 2652 2669 idSkipZeroes(result); 2653 2670 res>data = (char *)result; … … 3640 3657 intvec *weights=(intvec*)atGet(v,"isHomog",INTVEC_CMD); 3641 3658 res>data=(char *)syMinimize((syStrategy)v>Data()); 3642 if (weights!=NULL) 3659 if (weights!=NULL) 3643 3660 atSet(res, omStrDup("isHomog"),ivCopy(weights),INTVEC_CMD); 3644 3661 return FALSE; … … 3742 3759 if (w!=NULL) 3743 3760 { 3744 w=ivCopy(w); 3745 intvec **ww=&w; 3746 res>data = (char *)idMinEmbedding(v_id,FALSE,ww); 3747 atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD); 3748 } 3749 else 3750 res>data = (char *)idMinEmbedding(v_id); 3761 if (!idHomModule(v_id,currQuotient,&w)) 3762 { 3763 WarnS("wrong weights"); 3764 w=NULL; 3765 } 3766 else 3767 { 3768 w=ivCopy(w); 3769 intvec **ww=&w; 3770 res>data = (char *)idMinEmbedding(v_id,FALSE,ww); 3771 atSet(res,omStrDup("isHomog"),*ww,INTVEC_CMD); 3772 return FALSE; 3773 } 3774 } 3775 //else // both else branches 3776 res>data = (char *)idMinEmbedding(v_id); 3751 3777 return FALSE; 3752 3778 } … … 3835 3861 intvec *w=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 3836 3862 tHomog hom=testHomog; 3863 ideal u_id=(ideal)u>Data(); 3837 3864 if (w!=NULL) 3838 3865 { 3839 w=ivCopy(w); 3840 hom=isHomog; 3841 } 3842 res>data=(char *)t_rep_gb(currRing, (ideal)u>Data()); 3866 if (!idHomModule(u_id,currQuotient,&w)) 3867 { 3868 WarnS("wrong weights"); 3869 w=NULL; 3870 } 3871 else 3872 { 3873 w=ivCopy(w); 3874 hom=isHomog; 3875 } 3876 } 3877 res>data=(char *)t_rep_gb(currRing, u_id); 3843 3878 setFlag(res,FLAG_STD); 3844 3879 if (w!=NULL) atSet(res,omStrDup("isHomog"),w,INTVEC_CMD); … … 3848 3883 { 3849 3884 ideal result; 3885 ideal v_id=(ideal)v>Data(); 3850 3886 intvec *w=(intvec *)atGet(v,"isHomog",INTVEC_CMD); 3851 3887 tHomog hom=testHomog; 3852 3888 if (w!=NULL) 3853 3889 { 3854 w=ivCopy(w); 3855 hom=isHomog; 3856 } 3857 result=kStd((ideal)(v>Data()),currQuotient,hom,&w); 3890 if (!idHomModule(v_id,currQuotient,&w)) 3891 { 3892 WarnS("wrong weights"); 3893 w=NULL; 3894 } 3895 else 3896 { 3897 w=ivCopy(w); 3898 hom=isHomog; 3899 } 3900 } 3901 result=kStd(v_id,currQuotient,hom,&w); 3858 3902 idSkipZeroes(result); 3859 3903 res>data = (char *)result; … … 5278 5322 { 5279 5323 int maxl=(int)v>Data(); 5324 ideal u_id=(ideal)u>Data(); 5280 5325 int l=0; 5281 5326 resolvente r; … … 5290 5335 if (iv!=NULL) 5291 5336 { 5292 weights = (intvec**)omAlloc0Bin(void_ptr_bin); 5293 weights[0] = ivCopy(iv); 5294 l=1; 5295 } 5296 r=syResolvente((ideal)u>Data(),maxl,&l, &weights, iiOp==MRES_CMD); 5337 if (!idHomModule(u_id,currQuotient,&iv)) 5338 { 5339 WarnS("wrong weights"); 5340 iv=NULL; 5341 } 5342 else 5343 { 5344 weights = (intvec**)omAlloc0Bin(void_ptr_bin); 5345 weights[0] = ivCopy(iv); 5346 l=1; 5347 } 5348 } 5349 r=syResolvente(u_id,maxl,&l, &weights, iiOp==MRES_CMD); 5297 5350 } 5298 5351 else … … 5302 5355 iiMakeResolv(r,l,wmaxl,w>name,t3,weights); 5303 5356 return FALSE; 5304 return TRUE;5305 5357 } 5306 5358 #endif … … 5324 5376 intvec *ww=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 5325 5377 tHomog hom=testHomog; 5378 ideal u_id=(ideal)(u>Data()); 5326 5379 if (ww!=NULL) 5327 5380 { 5328 ww=ivCopy(ww); 5329 hom=isHomog; 5330 } 5331 result=kStd((ideal)(u>Data()), 5381 if (!idHomModule(u_id,currQuotient,&ww)) 5382 { 5383 WarnS("wrong weights"); 5384 ww=NULL; 5385 } 5386 else 5387 { 5388 ww=ivCopy(ww); 5389 hom=isHomog; 5390 } 5391 } 5392 result=kStd(u_id, 5332 5393 currQuotient, 5333 5394 hom,
Note: See TracChangeset
for help on using the changeset viewer.