Changeset 117ae9 in git
- Timestamp:
- Aug 26, 2016, 6:47:06 PM (7 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 8c38af481ca33e7eabaf73ab8152d41b20ed8669
- Parents:
- f5e732af7572071c189ad8185ce830f96ababa46
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rf5e732 r117ae9 194 194 struct sValCmd3 *psValCmd3; 195 195 struct sValCmdM *psValCmdM; 196 intnCmdUsed; /**< number of commands used */197 intnCmdAllocated; /**< number of commands-slots allocated */198 intnLastIdentifier; /**< valid indentifieres are slot 1..nLastIdentifier */196 unsigned nCmdUsed; /**< number of commands used */ 197 unsigned nCmdAllocated; /**< number of commands-slots allocated */ 198 unsigned nLastIdentifier; /**< valid indentifieres are slot 1..nLastIdentifier */ 199 199 } SArithBase; 200 200 … … 242 242 int iiTokType(int op) 243 243 { 244 for ( inti=0;i<sArithBase.nCmdUsed;i++)244 for (unsigned i=0;i<sArithBase.nCmdUsed;i++) 245 245 { 246 246 if (sArithBase.sCmds[i].tokval==op) … … 1291 1291 int c=m->cols(); 1292 1292 matrix mm=mpNew(r,c); 1293 inti,j;1293 unsigned i,j; 1294 1294 for(i=r;i>0;i--) 1295 1295 { … … 2055 2055 int vl= IDELEMS(vi); 2056 2056 ideal ui=(ideal)u->Data(); 2057 intul= IDELEMS(ui);2057 unsigned ul= IDELEMS(ui); 2058 2058 ideal R; matrix U; 2059 2059 ideal m = idLift(vi,ui,&R, FALSE,hasFlag(v,FLAG_STD),TRUE,&U); … … 2062 2062 matrix T = id_Module2formatedMatrix(m,vl,ul,currRing); 2063 2063 int i; 2064 if (MATCOLS(U) != ul)2065 { 2066 intmul=si_min(ul,MATCOLS(U));2064 if (MATCOLS(U) != (int)ul) 2065 { 2066 unsigned mul=si_min(ul,MATCOLS(U)); 2067 2067 matrix UU=mpNew(ul,ul); 2068 intj;2068 unsigned j; 2069 2069 for(i=mul;i>0;i--) 2070 2070 { … … 2330 2330 else 2331 2331 { 2332 inti;2332 unsigned i; 2333 2333 if (par_perm_size!=0) 2334 for(i=si_min(rPar(r),rPar(currRing)) -1;i>=0;i--) par_perm[i]=-(i+1);2334 for(i=si_min(rPar(r),rPar(currRing));i>0;i--) par_perm[i-1]=-i; 2335 2335 for(i=si_min(r->N,currRing->N);i>0;i--) perm[i]=i; 2336 2336 } … … 2338 2338 if ((iiOp==FETCH_CMD) &&(BVERBOSE(V_IMAP))) 2339 2339 { 2340 inti;2341 for(i=0;i< si_min(r->N,currRing->N);i++)2340 unsigned i; 2341 for(i=0;i<(unsigned)si_min(r->N,currRing->N);i++) 2342 2342 { 2343 2343 Print("// var nr %d: %s -> %s\n",i,r->names[i],currRing->names[i]); 2344 2344 } 2345 for(i=0;i< si_min(rPar(r),rPar(currRing));i++) // possibly empty loop2345 for(i=0;i<(unsigned)si_min(rPar(r),rPar(currRing));i++) // possibly empty loop 2346 2346 { 2347 2347 Print("// par nr %d: %s -> %s\n", … … 2795 2795 intvec *iv=(intvec *)v->Data(); 2796 2796 poly p=pOne(); 2797 int i,e;2797 int e; 2798 2798 BOOLEAN err=FALSE; 2799 for( i=si_min(currRing->N,iv->length()); i>0; i--)2799 for(unsigned i=si_min(currRing->N,iv->length()); i>0; i--) 2800 2800 { 2801 2801 e=(*iv)[i-1]; … … 3623 3623 int i; 3624 3624 int ret = -1; 3625 for( int nfinished = 0; nfinished < Lforks->nr+1; nfinished++)3625 for(unsigned nfinished = 0; nfinished < ((unsigned)Lforks->nr)+1; nfinished++) 3626 3626 { 3627 3627 i = slStatusSsiL(Lforks, timeout); … … 4011 4011 else 4012 4012 { 4013 omFreeSize(r,sizeof(*r)); 4013 4014 Werror("det of %d x %d cmatrix",i,j); 4014 4015 return TRUE; 4015 4016 } 4017 res->data=(void*)r; 4016 4018 return FALSE; 4017 4019 } … … 4082 4084 //Anne's Idea for std(4,2x) = 0 bug 4083 4085 long dcurr = d; 4084 for( i=0;i<IDELEMS(vv);i++)4085 { 4086 if(vv->m[i ] != NULL && !n_IsUnit(pGetCoeff(vv->m[i]),currRing->cf))4086 for(unsigned ii=0;ii<(unsigned)IDELEMS(vv);ii++) 4087 { 4088 if(vv->m[ii] != NULL && !n_IsUnit(pGetCoeff(vv->m[ii]),currRing->cf)) 4087 4089 { 4088 4090 ideal vc = idCopy(vv); 4089 4091 poly c = pInit(); 4090 pSetCoeff0(c,nCopy(pGetCoeff(vv->m[i ])));4092 pSetCoeff0(c,nCopy(pGetCoeff(vv->m[ii]))); 4091 4093 idInsertPoly(vc,c); 4092 4094 idSkipZeroes(vc); 4093 for( j = 0;j<IDELEMS(vc)-1;j++)4095 for(unsigned jj = 0;jj<(unsigned)IDELEMS(vc)-1;jj++) 4094 4096 { 4095 if((vc->m[j ]!=NULL)4096 && (n_DivBy(pGetCoeff(vc->m[j ]),pGetCoeff(c),currRing->cf)))4097 if((vc->m[jj]!=NULL) 4098 && (n_DivBy(pGetCoeff(vc->m[jj]),pGetCoeff(c),currRing->cf))) 4097 4099 { 4098 pDelete(&vc->m[j ]);4100 pDelete(&vc->m[jj]); 4099 4101 } 4100 4102 } … … 4856 4858 { 4857 4859 char *s= (char *)v->Data(); 4858 int i = 1; 4859 for(i=0; i<sArithBase.nCmdUsed; i++) 4860 for(unsigned i=0; i<sArithBase.nCmdUsed; i++) 4860 4861 { 4861 4862 //Print("test %d, >>%s<<, tab:>>%s<<\n",i,s,sArithBase.sCmds[i].name); … … 5453 5454 return FALSE; 5454 5455 } 5456 #if 0 // unused 5455 5457 static BOOLEAN jjsyMinBase(leftv res, leftv v) 5456 5458 { … … 5458 5460 return FALSE; 5459 5461 } 5462 #endif 5460 5463 static BOOLEAN jjpMaxComp(leftv res, leftv v) 5461 5464 { … … 6367 6370 // <coeff>, par1, par2 -> number2 6368 6371 { 6369 coeffs cf=(coeffs) w->Data();6372 coeffs cf=(coeffs)u->Data(); 6370 6373 if ((cf==NULL) ||(cf->cfRandom==NULL)) 6371 6374 { … … 7657 7660 static BOOLEAN jjRESERVED0(leftv, leftv) 7658 7661 { 7659 inti=1;7660 intnCount = (sArithBase.nCmdUsed-1)/3;7662 unsigned i=1; 7663 unsigned nCount = (sArithBase.nCmdUsed-1)/3; 7661 7664 if((3*nCount)<sArithBase.nCmdUsed) nCount++; 7662 7665 //Print("CMDS: %d/%d\n", sArithBase.nCmdUsed, … … 8705 8708 * then alphabetically */ 8706 8709 8710 #if 0 // unused 8707 8711 static BOOLEAN jjANY2LIST(leftv res, leftv v, int cnt) 8708 8712 { … … 8719 8723 return failed; 8720 8724 } 8725 #endif 8721 8726 8722 8727 BOOLEAN iiExprArithM(leftv res, leftv a, int op) … … 8970 8975 #endif 8971 8976 if (tok>MAX_TOK) return getBlackboxName(tok); 8972 inti;8977 unsigned i; 8973 8978 for(i=0; i<sArithBase.nCmdUsed; i++) 8974 8979 //while (sArithBase.sCmds[i].tokval!=0) … … 9137 9142 { 9138 9143 if(nPos<0) return NULL; 9139 if(nPos< sArithBase.nCmdUsed)9144 if(nPos<(int)sArithBase.nCmdUsed) 9140 9145 return sArithBase.sCmds[nPos].name; 9141 9146 return NULL; … … 9148 9153 9149 9154 nIndex = iiArithFindCmd(szName); 9150 if(nIndex<0 || nIndex>= sArithBase.nCmdUsed)9155 if(nIndex<0 || nIndex>=(int)sArithBase.nCmdUsed) 9151 9156 { 9152 9157 Print("'%s' not found (%d)\n", szName, nIndex); … … 9182 9187 { 9183 9188 // no checks: we rely on a correct generated code in iparith.inc 9184 assume( nPos < sArithBase.nCmdAllocated);9189 assume((unsigned)nPos < sArithBase.nCmdAllocated); 9185 9190 assume(szName!=NULL); 9186 9191 sArithBase.sCmds[nPos].name = omStrDup(szName); -
libpolys/polys/monomials/p_polys.h
rf5e732 r117ae9 189 189 static inline int pLength(poly a) 190 190 { 191 intl = 0;191 unsigned l = 0; 192 192 while (a!=NULL) 193 193 { … … 195 195 l++; 196 196 } 197 return l;197 return (int)l; 198 198 } 199 199
Note: See TracChangeset
for help on using the changeset viewer.