Changeset 671977 in git for Singular/iparith.cc
 Timestamp:
 Feb 13, 2009, 10:46:49 AM (15 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 9f7c98afd95242eaf9f63019cd36b483465f8c85
 Parents:
 f9ffa1187e21ddea0986a5d4614216f62c066d70
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/iparith.cc
rf9ffa1 r671977 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.49 3 20090117 10:19:17Singular Exp $ */4 /* $Id: iparith.cc,v 1.494 20090213 09:46:49 Singular Exp $ */ 5 5 6 6 /* … … 387 387 #endif /* OLD_RES */ 388 388 { "status", 0, STATUS_CMD, CMD_M}, 389 { "std", 0, STD_CMD , CMD_ 123},389 { "std", 0, STD_CMD , CMD_M}, 390 390 { "string", 0, STRING_CMD , ROOT_DECL_LIST}, 391 391 { "subst", 0, SUBST_CMD , CMD_M}, … … 3068 3068 i0=(ideal)v>CopyD(); 3069 3069 } 3070 int ii0=idElem(i0); 3070 int ii0=idElem(i0); /* size of i0 */ 3071 3071 i1=idSimpleAdd(i1,i0); 3072 3072 memset(i0>m,0,sizeof(poly)*IDELEMS(i0)); … … 3091 3091 BITSET save_test=test; 3092 3092 test=Sy_bit(OPT_SB_1); 3093 /* IDELEMS(il)ii0 appears to be the position of the first element of il that 3094 does not belong to the input ideal */ 3093 3095 result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)ii0); 3094 3096 test=save_test; … … 6951 6953 return b; 6952 6954 } 6955 static BOOLEAN jjSTD_HILB_WP(leftv res, leftv INPUT) 6956 { ideal result; 6957 leftv u = INPUT; /* an ideal, weighted homogeneous and standard */ 6958 leftv v = u>next; /* one additional polynomial or ideal */ 6959 leftv h = v>next; /* Hilbert vector */ 6960 leftv w = h>next; /* weight vector */ 6961 assumeStdFlag(u); 6962 ideal i1=(ideal)(u>Data()); 6963 ideal i0; 6964 intvec *vw=(intvec *)w>Data(); // weights of vars 6965 /* merging std_hilb_w and std_1 */ 6966 if (vw>length()!=currRing>N) 6967 { 6968 Werror("%d weights for %d variables",vw>length(),currRing>N); 6969 return TRUE; 6970 } 6971 int r=v>Typ(); 6972 if ((r==POLY_CMD) (r==VECTOR_CMD)) 6973 { 6974 i0=idInit(1,i1>rank); 6975 i0>m[0]=(poly)v>Data(); 6976 } 6977 else /* IDEAL */ 6978 { 6979 i0=(ideal)v>Data(); 6980 } 6981 int ii0=idElem(i0); 6982 i1 = idSimpleAdd(i1,i0); 6983 memset(i0>m,0,sizeof(poly)*IDELEMS(i0)); 6984 idDelete(&i0); 6985 intvec *ww=(intvec *)atGet(u,"isHomog",INTVEC_CMD); 6986 tHomog hom=testHomog; 6987 /* u_id from jjSTD_W is now i1 as in jjSTD_1 */ 6988 if (ww!=NULL) 6989 { 6990 if (!idTestHomModule(i1,currQuotient,ww)) 6991 { 6992 WarnS("wrong weights"); 6993 ww=NULL; 6994 } 6995 else 6996 { 6997 ww=ivCopy(ww); 6998 hom=isHomog; 6999 } 7000 } 7001 BITSET save_test=test; 7002 test=Sy_bit(OPT_SB_1); 7003 result=kStd(i1, 7004 currQuotient, 7005 hom, 7006 &ww, // module weights 7007 (intvec *)h>Data(), // hilbert series 7008 0, // syzComp, whatever it is... 7009 IDELEMS(i1)ii0, // new ideal 7010 vw); // weights of vars 7011 test=save_test; 7012 idDelete(&i1); 7013 idSkipZeroes(result); 7014 res>data = (char *)result; 7015 if (!TEST_OPT_DEGBOUND) setFlag(res,FLAG_STD); 7016 if (ww!=NULL) atSet(res,omStrDup("isHomog"),ww,INTVEC_CMD); 7017 return FALSE; 7018 } 7019 6953 7020 6954 7021 /*=================== operations with many arg.: table =================*/ … … 7000 7067 ,{loSimplex, SIMPLEX_CMD, LIST_CMD, 6 NO_PLURAL} 7001 7068 ,{nuUResSolve, URSOLVE_CMD, LIST_CMD, 4 NO_PLURAL} 7069 ,{jjCALL1ARG, STD_CMD, IDEAL_CMD, 1 ALLOW_PLURAL} 7070 ,{jjCALL2ARG, STD_CMD, IDEAL_CMD, 2 ALLOW_PLURAL} 7071 ,{jjCALL3ARG, STD_CMD, IDEAL_CMD, 3 NO_PLURAL} 7072 ,{jjSTD_HILB_WP, STD_CMD, IDEAL_CMD, 4 NO_PLURAL} 7002 7073 ,{NULL, 0, 0, 0 NO_PLURAL} 7003 7074 };
Note: See TracChangeset
for help on using the changeset viewer.