Changeset 7fccc79 in git
 Timestamp:
 Aug 12, 2011, 2:11:46 PM (12 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 1f414c83d736799f4aa2169403778da7b6403897
 Parents:
 8a5c493dd06549f9120fe7fda0d889a440420073
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20110812 14:11:46+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 13:21:28+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/ipshell.cc
r8a5c49 r7fccc79 996 996 if (hNexist == 0) 997 997 { 998 intvec *iv=new intvec( pVariables);999 for(i=0; i< pVariables; i++) (*iv)[i]=1;998 intvec *iv=new intvec(rVar(currRing)); 999 for(i=0; i<rVar(currRing); i++) (*iv)[i]=1; 1000 1000 res>Init(1); 1001 1001 res>m[0].rtyp=INTVEC_CMD; … … 1011 1011 hMu = 0; 1012 1012 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 1013 hvar = (varset)omAlloc(( pVariables+ 1) * sizeof(int));1014 hpure = (scmon)omAlloc((1 + ( pVariables * pVariables)) * sizeof(long));1013 hvar = (varset)omAlloc((rVar(currRing) + 1) * sizeof(int)); 1014 hpure = (scmon)omAlloc((1 + (rVar(currRing) * rVar(currRing))) * sizeof(long)); 1015 1015 hrad = hexist; 1016 1016 hNrad = hNexist; 1017 radmem = hCreate( pVariables 1);1018 hCo = pVariables+ 1;1019 hNvar = pVariables;1017 radmem = hCreate(rVar(currRing)  1); 1018 hCo = rVar(currRing) + 1; 1019 hNvar = rVar(currRing); 1020 1020 hRadical(hrad, &hNrad, hNvar); 1021 1021 hSupp(hrad, hNrad, hvar, &hNvar); … … 1023 1023 { 1024 1024 hCo = hNvar; 1025 memset(hpure, 0, ( pVariables+ 1) * sizeof(long));1025 memset(hpure, 0, (rVar(currRing) + 1) * sizeof(long)); 1026 1026 hPure(hrad, 0, &hNrad, hvar, hNvar, hpure, &hNpure); 1027 1027 hLexR(hrad, hNrad, hvar, hNvar); 1028 1028 hDimSolve(hpure, hNpure, hrad, hNrad, hvar, hNvar); 1029 1029 } 1030 if (hCo && (hCo < pVariables))1030 if (hCo && (hCo < rVar(currRing))) 1031 1031 { 1032 1032 hIndMult(hpure, hNpure, hrad, hNrad, hvar, hNvar); … … 1036 1036 ISet = save; 1037 1037 hMu2 = 0; 1038 if (all && (hCo+1 < pVariables))1038 if (all && (hCo+1 < rVar(currRing))) 1039 1039 { 1040 1040 JSet = (indset)omAlloc0Bin(indlist_bin); … … 1079 1079 omFreeBin((ADDRESS)ISet, indlist_bin); 1080 1080 } 1081 hKill(radmem, pVariables 1);1082 omFreeSize((ADDRESS)hpure, (1 + ( pVariables * pVariables)) * sizeof(long));1083 omFreeSize((ADDRESS)hvar, ( pVariables+ 1) * sizeof(int));1081 hKill(radmem, rVar(currRing)  1); 1082 omFreeSize((ADDRESS)hpure, (1 + (rVar(currRing) * rVar(currRing))) * sizeof(long)); 1083 omFreeSize((ADDRESS)hvar, (rVar(currRing) + 1) * sizeof(int)); 1084 1084 omFreeSize((ADDRESS)hwork, hNexist * sizeof(scmon)); 1085 1085 hDelete(hexist, hNexist); … … 1461 1461 { 1462 1462 pGetCoeff(po)=nInit(1); 1463 for (i= pVariables; i>0; i)1463 for (i=rVar(currRing); i>0; i) 1464 1464 { 1465 1465 if (pGetExp(po, i) > 0) pDecrExp(po,i); … … 2433 2433 else if (par_perm_size!=0) 2434 2434 for(i=si_min(rPar(orig_ring),rPar(currRing))1;i>=0;i) par_perm[i]=(i+1); 2435 for(i=si_min(orig_ring>N, pVariables);i>0;i) perm[i]=i;2435 for(i=si_min(orig_ring>N,rVar(currRing));i>0;i) perm[i]=i; 2436 2436 #endif 2437 2437 ideal dest_id=idInit(IDELEMS(q),1); … … 2508 2508 ideal id=(ideal)a>Data(); 2509 2509 2510 result =mpNew(IDELEMS(id), pVariables);2510 result =mpNew(IDELEMS(id),rVar(currRing)); 2511 2511 for (i=1; i<=IDELEMS(id); i++) 2512 2512 { 2513 for (j=1; j<= pVariables; j++)2513 for (j=1; j<=rVar(currRing); j++) 2514 2514 { 2515 2515 MATELEM(result,i,j) = pDiff(id>m[i1],j); … … 2739 2739 { 2740 2740 ideal F=(ideal)id>Data(); 2741 intvec * iv = new intvec( pVariables);2741 intvec * iv = new intvec(rVar(currRing)); 2742 2742 polyset s; 2743 2743 int sl, n, i; … … 2747 2747 s = F>m; 2748 2748 sl = IDELEMS(F)  1; 2749 n = pVariables;2749 n = rVar(currRing); 2750 2750 double wNsqr = (double)2.0 / (double)n; 2751 2751 wFunctional = wFunctionalBuch; … … 2762 2762 res>data=(char *)idQHomWeight((ideal)v>Data()); 2763 2763 if (res>data==NULL) 2764 res>data=(char *)new intvec( pVariables);2764 res>data=(char *)new intvec(rVar(currRing)); 2765 2765 return FALSE; 2766 2766 } … … 3055 3055 3056 3056 ideal J = NULL; 3057 J = idInit( pVariables,1 );3057 J = idInit( rVar(currRing),1 ); 3058 3058 3059 3059 #ifdef SPECTRUM_DEBUG … … 3067 3067 #endif 3068 3068 3069 for( i=0; i< pVariables; i++ )3069 for( i=0; i<rVar(currRing); i++ ) 3070 3070 { 3071 3071 J>m[i] = pDiff( h,i+1); //j ); … … 3142 3142 //  3143 3143 3144 for( i= pVariables; i>0; i )3144 for( i=rVar(currRing); i>0; i ) 3145 3145 { 3146 3146 if( hasAxis( stdJ,i )==FALSE ) … … 3172 3172 pGetCoeff(hc) = nInit(1); 3173 3173 3174 for( i= pVariables; i>0; i )3174 for( i=rVar(currRing); i>0; i ) 3175 3175 { 3176 3176 if( pGetExp( hc,i )>0 ) pDecrExp( hc,i ); … … 3231 3231 3232 3232 poly wc = ( fast==0 ? pCopy( hc ) : 3233 ( fast==1 ? computeWC( nph,(Rational) pVariables) :3234 /* fast==2 */computeWC( nph,((Rational) pVariables)/(Rational)2 ) ) );3233 ( fast==1 ? computeWC( nph,(Rational)rVar(currRing) ) : 3234 /* fast==2 */computeWC( nph,((Rational)rVar(currRing))/(Rational)2 ) ) ); 3235 3235 3236 3236 #ifdef SPECTRUM_DEBUG … … 3552 3552 for( i=0, j=n1; i<=j; i++,j ) 3553 3553 { 3554 if( (*num)[i] != pVariables*((*den)[i])  (*num)[j] 3554 if( (*num)[i] != rVar(currRing)*((*den)[i])  (*num)[j]  3555 3555 (*den)[i] != (*den)[j]  3556 3556 (*mul)[i] != (*mul)[j] ) … … 3760 3760 int found,cmp; 3761 3761 3762 Rational smax( ( fast==0 ? 0 : pVariables),3762 Rational smax( ( fast==0 ? 0 : rVar(currRing) ), 3763 3763 ( fast==2 ? 2 : 1 ) ); 3764 3764 … … 3934 3934 for( n1=0, n2=n1; n1<n2; n1++, n2 ) 3935 3935 { 3936 (*nom) [n2] = pVariables*(*den)[n1](*nom)[n1];3936 (*nom) [n2] = rVar(currRing)*(*den)[n1](*nom)[n1]; 3937 3937 (*den) [n2] = (*den)[n1]; 3938 3938 (*mult)[n2] = (*mult)[n1]; … … 3952 3952 if( (*mult)[n1]!=(*mult)[n2]  3953 3953 (*den) [n1]!= (*den)[n2]  3954 (*nom)[n1]+(*nom)[n2]!= pVariables*(*den) [n1] )3954 (*nom)[n1]+(*nom)[n2]!=rVar(currRing)*(*den) [n1] ) 3955 3955 { 3956 3956 symmetric = FALSE; … … 4155 4155 elist>Init( 0 ); 4156 4156 4157 if ( pVariables> 1 )4157 if ( rVar(currRing) > 1 ) 4158 4158 { 4159 4159 piter= gls; 4160 for ( i= 1; i <= pVariables; i++ )4160 for ( i= 1; i <= rVar(currRing); i++ ) 4161 4161 if ( pGetExp( piter, i ) ) 4162 4162 { … … 4166 4166 while ( piter ) 4167 4167 { 4168 for ( i= 1; i <= pVariables; i++ )4168 for ( i= 1; i <= rVar(currRing); i++ ) 4169 4169 if ( (vpos != i) && (pGetExp( piter, i ) != 0) ) 4170 4170 { … … 4273 4273 return TRUE; 4274 4274 } 4275 if ( n != pVariables)4276 { 4277 Werror("Size of first input ideal must be equal to %d!", pVariables);4275 if ( n != rVar(currRing) ) 4276 { 4277 Werror("Size of first input ideal must be equal to %d!",rVar(currRing)); 4278 4278 return TRUE; 4279 4279 } … … 5488 5488 int i; 5489 5489 poly p; 5490 for(i= pVariables;i>0;i)5490 for(i=rVar(currRing);i>0;i) 5491 5491 { 5492 5492 if (e[i]>0) … … 5502 5502 res>data=(char*)l; 5503 5503 setFlag(res,FLAG_STD); 5504 omFreeSize((ADDRESS)e,( pVariables+1)*sizeof(int));5504 omFreeSize((ADDRESS)e,(rVar(currRing)+1)*sizeof(int)); 5505 5505 } 5506 5506 BOOLEAN jjVARIABLES_P(leftv res, leftv u) 5507 5507 { 5508 int *e=(int *)omAlloc0(( pVariables+1)*sizeof(int));5508 int *e=(int *)omAlloc0((rVar(currRing)+1)*sizeof(int)); 5509 5509 int n=pGetVariables((poly)u>Data(),e); 5510 5510 jjINT_S_TO_ID(n,e,res); … … 5514 5514 BOOLEAN jjVARIABLES_ID(leftv res, leftv u) 5515 5515 { 5516 int *e=(int *)omAlloc0(( pVariables+1)*sizeof(int));5516 int *e=(int *)omAlloc0((rVar(currRing)+1)*sizeof(int)); 5517 5517 ideal I=(ideal)u>Data(); 5518 5518 int i;
Note: See TracChangeset
for help on using the changeset viewer.