Changeset e79e26 in git
- Timestamp:
- Jan 23, 2014, 1:41:47 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 616d68556ae75bb7c49364150bb827162c506899
- Parents:
- 190da3f8a1812ae3bf31c5c7fe7a441c0452abea
- Location:
- libpolys/polys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/ext_fields/algext.cc
r190da3 re79e26 1379 1379 } 1380 1380 1381 number naChineseRemainder(number *x, number *q,int rl, BOOLEAN sym,const coeffs cf) 1382 { 1383 poly *P=(poly*)omAlloc(rl*sizeof(poly*)); 1384 number *X=(number *)omAlloc(rl*sizeof(number)); 1385 int i; 1386 for(i=0;i<rl;i++) P[i]=p_Copy((poly)(x[i]),cf->extRing); 1387 poly result=p_ChineseRemainder(P,X,q,rl,cf->extRing); 1388 omFreeSize(X,rl*sizeof(number)); 1389 omFreeSize(P,rl*sizeof(poly*)); 1390 return ((number)result); 1391 } 1392 1393 1381 1394 BOOLEAN naInitChar(coeffs cf, void * infoStruct) 1382 1395 { … … 1419 1432 cf->cfInit = naInit; 1420 1433 cf->cfInit_bigint = naInit_bigint; 1434 // cf->cfFarey 1435 cf->cfChineseRemainder= naChineseRemainder; 1421 1436 cf->cfInt = naInt; 1422 1437 cf->cfNeg = naNeg; -
libpolys/polys/ext_fields/transext.cc
r190da3 re79e26 2363 2363 } 2364 2364 2365 number ntChineseRemainder(number *x, number *q,int rl, BOOLEAN sym,const coeffs cf) 2366 { 2367 fraction result = (fraction)omAlloc0Bin(fractionObjectBin); 2368 int i; 2369 2370 poly *P=(poly*)omAlloc(rl*sizeof(poly*)); 2371 number *X=(number *)omAlloc(rl*sizeof(number)); 2372 2373 for(i=0;i<rl;i++) P[i]=p_Copy(NUM((fraction)(x[i])),cf->extRing); 2374 NUM(result)=p_ChineseRemainder(P,X,q,rl,cf->extRing); 2375 2376 for(i=0;i<rl;i++) 2377 { 2378 P[i]=p_Copy(DEN((fraction)(x[i])),cf->extRing); 2379 if (P[i]==NULL) P[i]=p_One(cf->extRing); 2380 } 2381 DEN(result)=p_ChineseRemainder(P,X,q,rl,cf->extRing); 2382 2383 omFreeSize(X,rl*sizeof(number)); 2384 omFreeSize(P,rl*sizeof(poly*)); 2385 return ((number)result); 2386 } 2387 2365 2388 BOOLEAN ntInitChar(coeffs cf, void * infoStruct) 2366 2389 { … … 2398 2421 cf->cfInit = ntInit; 2399 2422 cf->cfInit_bigint = ntInit_bigint; 2423 //cf->cfFarey 2424 cf->cfChineseRemainder = ntChineseRemainder; 2400 2425 cf->cfInt = ntInt; 2401 2426 cf->cfNeg = ntNeg; -
libpolys/polys/monomials/p_polys.h
r190da3 re79e26 234 234 { 235 235 p_LmCheckPolyRing2(p, r); 236 pAssume2(rRing_has_Comp(r));237 236 if (r->pCompIndex>=0) __p_GetComp(p,r) = c; 238 237 return c;
Note: See TracChangeset
for help on using the changeset viewer.