Changeset 4e63600 in git for kernel/ideals.cc
 Timestamp:
 May 18, 2009, 2:36:23 PM (14 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
 Children:
 a7f20731ae0418bf29c11a9649481bd93b9bb6fa
 Parents:
 8660795525dd05cd4a19c0ba04f85758df5542fa
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/ideals.cc
r866079 r4e63600 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.7 2 20090518 12:03:28Singular Exp $ */4 /* $Id: ideals.cc,v 1.73 20090518 12:36:23 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT  all basic methods to manipulate ideals … … 1287 1287 *works always in a ring with ringorder_s 1288 1288 */ 1289 static ideal idPrepare (ideal h1, tHomog h , int syzcomp, intvec **w)1289 static ideal idPrepare (ideal h1, tHomog hom, int syzcomp, intvec **w) 1290 1290 { 1291 1291 ideal h2, h3; … … 1310 1310 } 1311 1311 h2>rank = syzcomp+i+1; 1312 1313 //if (hom==testHomog) 1314 //{ 1315 // if(idHomIdeal(h1,currQuotient)) 1316 // { 1317 // hom=TRUE; 1318 // } 1319 //} 1312 1320 1313 1321 #if MYTEST … … 1349 1357 1350 1358 1351 h3 = kStd(h2,currQuotient,h ,w,NULL,syzcomp);1359 h3 = kStd(h2,currQuotient,hom,w,NULL,syzcomp); 1352 1360 idDelete(&h2); 1353 1361 return h3; … … 3035 3043 } 3036 3044 3037 int i,j,cmax=2,order=0,ord,* diff,* iscom,diffmin=32000; 3045 long cmax=1,order=0,ord,* diff,diffmin=32000; 3046 int *iscom; 3047 int i,j; 3038 3048 poly p=NULL; 3039 3049 pFDegProc d; … … 3048 3058 { 3049 3059 p=F[i]=P[i]; 3050 cmax=si_max(cmax,(int)pMaxComp(p)+1); 3051 } 3052 diff = (int *)omAlloc0(cmax*sizeof(int)); 3060 cmax=si_max(cmax,(long)pMaxComp(p)); 3061 } 3062 cmax++; 3063 diff = (long *)omAlloc0(cmax*sizeof(long)); 3053 3064 if (w!=NULL) *w=new intvec(cmax1); 3054 3065 iscom = (int *)omAlloc0(cmax*sizeof(int)); … … 3059 3070 { 3060 3071 p=F[i]; 3061 while ((p!=NULL) && ( !iscom[pGetComp(p)])) pIter(p);3072 while ((p!=NULL) && (iscom[pGetComp(p)]==0)) pIter(p); 3062 3073 } 3063 3074 if ((p==NULL) && (i<length)) … … 3067 3078 else 3068 3079 { 3069 if (p==NULL) 3080 if (p==NULL) /* && (i==length) */ 3070 3081 { 3071 3082 i=0; … … 3088 3099 while (p!=NULL) 3089 3100 { 3090 //if (pLexOrder)3091 //ord=pTotaldegree(p);3092 //else3101 if (pLexOrder && (currRing>order[0]==ringorder_lp)) 3102 ord=pTotaldegree(p); 3103 else 3093 3104 // ord = p>order; 3094 ord = pFDeg(p,currRing);3095 if ( !iscom[pGetComp(p)])3105 ord = pFDeg(p,currRing); 3106 if (iscom[pGetComp(p)]==0) 3096 3107 { 3097 3108 diff[pGetComp(p)] = orderord; … … 3115 3126 *Print("order %d, ord %d, diff %d\n",order,ord,diff[pGetComp(p)]); 3116 3127 */ 3117 if (order != ord+diff[pGetComp(p)])3128 if (order != (ord+diff[pGetComp(p)])) 3118 3129 { 3119 3130 omFreeSize((ADDRESS) iscom,cmax*sizeof(int)); 3120 omFreeSize((ADDRESS) diff,cmax*sizeof( int));3131 omFreeSize((ADDRESS) diff,cmax*sizeof(long)); 3121 3132 omFreeSize((ADDRESS) F,length*sizeof(poly)); 3122 3133 delete *w;*w=NULL; … … 3129 3140 omFreeSize((ADDRESS) iscom,cmax*sizeof(int)); 3130 3141 omFreeSize((ADDRESS) F,length*sizeof(poly)); 3131 for (i=1;i<cmax;i++) (**w)[i1]= diff[i];3142 for (i=1;i<cmax;i++) (**w)[i1]=(int)(diff[i]); 3132 3143 for (i=1;i<cmax;i++) 3133 3144 { … … 3138 3149 for (i=1;i<cmax;i++) 3139 3150 { 3140 (**w)[i1]= diff[i]diffmin;3141 } 3142 } 3143 omFreeSize((ADDRESS) diff,cmax*sizeof( int));3151 (**w)[i1]=(int)(diff[i]diffmin); 3152 } 3153 } 3154 omFreeSize((ADDRESS) diff,cmax*sizeof(long)); 3144 3155 return TRUE; 3145 3156 }
Note: See TracChangeset
for help on using the changeset viewer.