Changeset eefc3a in git
 Timestamp:
 Dec 1, 2011, 6:37:22 PM (12 years ago)
 Branches:
 (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
 Children:
 4fe8a30d668fa6f87de68f0c0207d54767119a52
 Parents:
 91788c087460478b3feb0c0461c30cb0383129fe
 gitauthor:
 Martin Lee <martinlee84@web.de>20111201 18:37:22+01:00
 gitcommitter:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20111212 18:00:42+01:00
 Location:
 factory
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

factory/facFactorize.cc
r91788c0 reefc3a 139 139 testFactors (const CanonicalForm& G, const CFList& uniFactors, 140 140 CanonicalForm& sqrfPartF, CFList& factors, 141 CFFList*& bufSqrfFactors, CFList& evalSqrfPartF) 141 CFFList*& bufSqrfFactors, CFList& evalSqrfPartF, 142 const CFArray& evalPoint) 142 143 { 143 144 CanonicalForm tmp; … … 164 165 sqrfPartF *= i.getItem().factor(); 165 166 166 evalSqrfPartF= evaluateAt Zero (sqrfPartF);167 168 CanonicalForm test= evalSqrfPartF.getFirst() ( 0, 2);167 evalSqrfPartF= evaluateAtEval (sqrfPartF, evalPoint); 168 169 CanonicalForm test= evalSqrfPartF.getFirst() (evalPoint[0], 2); 169 170 170 171 if (degree (test) != degree (sqrfPartF, 1)) … … 229 230 230 231 test= prod (factors); 231 tmp= evalSqrfPartF.getFirst() ( 0,2);232 tmp= evalSqrfPartF.getFirst() (evalPoint[0],2); 232 233 if (test/Lc (test) != tmp/Lc (tmp)) 233 234 return 0; … … 262 263 //bivariate leading coefficients are already the true leading coefficients 263 264 result= LCFFactors; 264 Variable v= Variable (LCF.mvar());265 CanonicalForm bla= 1;266 for (CFListIterator i= result; i.hasItem(); i++)267 {268 i.getItem()= i.getItem() (v+evaluation.getLast(), v);269 bla *= Lc (i.getItem());270 }271 265 found= true; 272 266 } … … 304 298 CFMap dummy; 305 299 for (CFListIterator i= factors; i.hasItem(); i++) 306 {307 300 i.getItem()= compress (i.getItem(), dummy); 308 i.getItem()= i.getItem() (Variable (1)+evaluation.getLast(), Variable (1));309 }310 301 311 302 CanonicalForm sqrfPartF; 312 303 CFFList * bufSqrfFactors= new CFFList [factors.length()]; 313 CFList evalSqrfPartF; 314 CFList bufFactors; 304 CFList evalSqrfPartF, bufFactors; 305 CFArray evalPoint= CFArray (evaluation.length()  1); 306 CFListIterator iter= evaluation; 307 for (int i= evaluation.length()  2; i > 1; i, iter++) 308 evalPoint[i]= iter.getItem(); 315 309 //TODO sqrfPartF einmal berechnen nicht stÃ€ndig 316 310 int pass= testFactors (F, factors, sqrfPartF, 317 bufFactors, bufSqrfFactors, evalSqrfPartF );311 bufFactors, bufSqrfFactors, evalSqrfPartF, evalPoint); 318 312 319 313 bool foundDifferent= false; … … 334 328 for (int i= 0; i < length; i++) 335 329 { 336 CanonicalForm bufF; 337 CFListIterator iter; 330 CanonicalForm bufF, swap; 338 331 CFList bufBufFactors; 332 CFArray buf; 339 333 if (!differentSecondVarLCs [i].isEmpty()) 340 334 { … … 358 352 bufF= swapvar (bufF, x, z); 359 353 bufBufFactors= bufFactors; 354 evalPoint= CFArray (evaluation.length()  1); 355 buf= CFArray (evaluation.length()); 356 iter= evaluation; 357 int k= evaluation.length()  1; 358 for (; iter.hasItem(); iter++, k) 359 buf[k]= iter.getItem(); 360 swap= buf[z.level()  1]; 361 buf[z.level()  1]= buf[0]; 362 buf[0]= 0; 363 int l= 0; 364 for (k= 0; k < evaluation.length(); k++) 365 { 366 if (buf[k].isZero()) 367 continue; 368 evalPoint[l]= buf[k]; 369 l++; 370 } 360 371 pass= testFactors (bufF, bufBufFactors, sqrfPartF, bufFactors, 361 bufSqrfFactors, evalSqrfPartF );372 bufSqrfFactors, evalSqrfPartF, evalPoint); 362 373 if (pass) 363 374 { … … 399 410 400 411 bufFactors= factors; 401 412 CFList evaluation2; 413 if (y == x) 414 evaluation2= evaluation; 415 else 416 { 417 CanonicalForm tmp; 418 evaluation2= evaluation; 419 int i= evaluation.length() + 1; 420 for (CFListIterator iter= evaluation2; iter.hasItem(); iter++, i) 421 { 422 if (i == y.level()) 423 { 424 tmp= iter.getItem(); 425 iter.getItem()= evaluation2.getLast(); 426 evaluation2.removeLast(); 427 evaluation2.append (tmp); 428 break; 429 } 430 } 431 } 432 433 sqrfPartF= shift2Zero (sqrfPartF, evalSqrfPartF, evaluation2, 1); 402 434 if (factors.length() > 1) 403 435 { … … 408 440 leadingCoeffs[i]= LC1; 409 441 for (CFListIterator i= factors; i.hasItem(); i++) 442 { 443 i.getItem()= i.getItem() (x + evaluation2.getLast(), x); 410 444 i.getItem() *= LC1 (0,2)/Lc (i.getItem()); 445 } 411 446 factors.insert (1); 412 447 … … 455 490 factors= evalSqrfPartF.getLast(); 456 491 457 CFList interMedResult= recoverFactors (evalSqrfPartF.getLast(), factors); 492 for (CFListIterator iter= factors; iter.hasItem(); iter++) 493 iter.getItem()= reverseShift (iter.getItem(), evaluation2, 1); 494 495 CFList interMedResult= 496 recoverFactors (reverseShift(evalSqrfPartF.getLast(),evaluation2,1), factors); 458 497 459 498 CFList result; … … 735 774 biFactorsLCs.append (LC (i.getItem(), 1)); 736 775 737 738 //shifting to zero739 A= shift2Zero (A, Aeval, evaluation);740 741 CanonicalForm hh= Lc (Aeval.getFirst());742 743 for (CFListIterator i= Aeval; i.hasItem(); i++)744 i.getItem() /= hh;745 746 A /= hh;747 748 776 Variable w; 749 777 CFList leadingCoeffs= precomputeLeadingCoeff (LC (A, 1), biFactorsLCs, … … 777 805 } 778 806 } 779 Aeval= evaluateAtZero (A); 780 } 781 782 CFListIterator iter= biFactors; 783 for (; iter.hasItem(); iter++) 784 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 785 807 } 808 809 CFListIterator iter; 786 810 CanonicalForm oldA= A; 787 811 CFList oldBiFactors= biFactors; … … 792 816 Aeval= evaluateAtZero (A); 793 817 tmp= leadingCoeffs.getFirst(); 794 for (int i= A.level(); i > 2; i) 795 tmp= tmp (0, i); 818 iter= evaluation; 819 for (int i= A.level(); i > 2; i, iter++) 820 tmp= tmp (iter.getItem(), i); 796 821 if (!tmp.inCoeffDomain()) 797 822 { … … 802 827 } 803 828 } 804 hh= Lc (Aeval.getFirst());805 for (CFListIterator i= Aeval; i.hasItem(); i++)806 i.getItem() /= hh;807 808 A /= hh;809 829 } 810 830 … … 813 833 //prepare leading coefficients 814 834 CFList* leadingCoeffs2= new CFList [A.level()  2]; 815 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, biFactors); 835 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, biFactors, 836 evaluation); 837 838 839 Aeval= evaluateAtEval (A, evaluation, 2); 840 841 CanonicalForm hh= Lc (Aeval.getFirst()); 842 843 for (CFListIterator i= Aeval; i.hasItem(); i++) 844 i.getItem() /= hh; 845 846 A /= hh; 847 848 //shifting to zero 849 A= shift2Zero (A, Aeval, evaluation); 850 851 for (iter= biFactors; iter.hasItem(); iter++) 852 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 853 854 for (int i= 0; i < A.level()  2; i++) 855 { 856 if (i != A.level()  3) 857 leadingCoeffs2[i]= CFList(); 858 } 859 for (iter= leadingCoeffs2[A.level()  3]; iter.hasItem(); iter++) 860 { 861 iter.getItem()= shift2Zero (iter.getItem(), list, evaluation); 862 for (int i= A.level()  4; i > 1; i) 863 { 864 if (i + 1 == A.level()  3) 865 leadingCoeffs2[i].append (iter.getItem() (0, i + 4)); 866 else 867 leadingCoeffs2[i].append (leadingCoeffs2[i+1].getLast() (0, i + 4)); 868 } 869 } 816 870 817 871 CFArray Pi; … … 831 885 { 832 886 int check= factors.length(); 833 factors= recoverFactors (reverseShift (oldA, evaluation), factors,834 887 A= oldA; 888 factors= recoverFactors (A, factors, evaluation); 835 889 if (check != factors.length()) 836 890 noOneToOne= true; … … 838 892 if (noOneToOne) 839 893 { 840 A= oldA; 841 Aeval= evaluateAtZero (A); 894 A= shift2Zero (oldA, Aeval, evaluation); 842 895 biFactors= oldBiFactors; 896 for (iter= biFactors; iter.hasItem(); iter++) 897 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 843 898 CanonicalForm LCA= LC (Aeval.getFirst(), 1); 844 899 CanonicalForm yToLift= power (y, lift); 
factory/facFqFactorize.cc
r91788c0 reefc3a 1279 1279 } 1280 1280 1281 CFList evaluateAtEval (const CanonicalForm& F, const CFArray& eval) 1282 { 1283 CFList result; 1284 CanonicalForm buf= F; 1285 result.insert (buf); 1286 int k= eval.size(); 1287 for (int i= 1; i < k; i++) 1288 { 1289 buf= buf (eval[i], i + 2); 1290 result.insert (buf); 1291 } 1292 return result; 1293 } 1294 1295 CFList evaluateAtEval (const CanonicalForm& F, const CFList& evaluation, int l) 1296 { 1297 CFList result; 1298 CanonicalForm buf= F; 1299 result.insert (buf); 1300 int k= evaluation.length() + l  1; 1301 CFListIterator j= evaluation; 1302 for (int i= k; j.hasItem() && i > l; i, j++) 1303 { 1304 if (F.level() < i) 1305 continue; 1306 buf= buf (j.getItem(), i); 1307 result.insert (buf); 1308 } 1309 return result; 1310 } 1311 1281 1312 int 1282 1313 testFactors (const CanonicalForm& G, const CFList& uniFactors, 1283 1314 const Variable& alpha, CanonicalForm& sqrfPartF, CFList& factors, 1284 CFFList*& bufSqrfFactors, CFList& evalSqrfPartF) 1315 CFFList*& bufSqrfFactors, CFList& evalSqrfPartF, 1316 const CFArray& evalPoint) 1285 1317 { 1286 1318 CanonicalForm tmp; … … 1307 1339 sqrfPartF *= i.getItem().factor(); 1308 1340 1309 evalSqrfPartF= evaluateAt Zero (sqrfPartF);1310 1311 CanonicalForm test= evalSqrfPartF.getFirst() ( 0, 2);1341 evalSqrfPartF= evaluateAtEval (sqrfPartF, evalPoint); 1342 1343 CanonicalForm test= evalSqrfPartF.getFirst() (evalPoint[0], 2); 1312 1344 1313 1345 if (degree (test) != degree (sqrfPartF, 1)) … … 1372 1404 1373 1405 test= prod (factors); 1374 tmp= evalSqrfPartF.getFirst() ( 0,2);1406 tmp= evalSqrfPartF.getFirst() (evalPoint[0],2); 1375 1407 if (test/Lc (test) != tmp/Lc (tmp)) 1376 1408 return 0; … … 1382 1414 precomputeLeadingCoeff (const CanonicalForm& LCF, const CFList& LCFFactors, 1383 1415 const Variable& alpha, const CFList& evaluation, 1384 CFList* & differentSecondVarLCs, int l ength,1416 CFList* & differentSecondVarLCs, int lSecondVarLCs, 1385 1417 Variable& y 1386 1418 ) … … 1406 1438 //bivariate leading coefficients are already the true leading coefficients 1407 1439 result= LCFFactors; 1408 Variable v= Variable (LCF.mvar());1409 CanonicalForm bla= 1;1410 for (CFListIterator i= result; i.hasItem(); i++)1411 {1412 i.getItem()= i.getItem() (v+evaluation.getLast(), v);1413 bla *= Lc (i.getItem());1414 }1415 1440 found= true; 1416 1441 } … … 1418 1443 { 1419 1444 CFListIterator j; 1420 for (int i= 0; i < l ength; i++)1445 for (int i= 0; i < lSecondVarLCs; i++) 1421 1446 { 1422 1447 for (j= differentSecondVarLCs[i]; j.hasItem(); j++) … … 1448 1473 CFMap dummy; 1449 1474 for (CFListIterator i= factors; i.hasItem(); i++) 1450 {1451 1475 i.getItem()= compress (i.getItem(), dummy); 1452 i.getItem()= i.getItem() (Variable (1) + evaluation.getLast(), Variable (1));1453 }1454 1476 1455 1477 CanonicalForm sqrfPartF; 1456 1478 CFFList * bufSqrfFactors= new CFFList [factors.length()]; 1457 CFList evalSqrfPartF; 1458 CFList bufFactors; 1479 CFList evalSqrfPartF, bufFactors; 1480 CFArray evalPoint= CFArray (evaluation.length()  1); 1481 CFListIterator iter= evaluation; 1482 for (int i= evaluation.length()  2; i > 1; i, iter++) 1483 evalPoint[i]= iter.getItem(); 1484 1459 1485 int pass= testFactors (F, factors, alpha, sqrfPartF, 1460 bufFactors, bufSqrfFactors, evalSqrfPartF );1486 bufFactors, bufSqrfFactors, evalSqrfPartF, evalPoint); 1461 1487 1462 1488 bool foundDifferent= false; 1463 Variable z; 1464 Variable x= y; 1489 Variable z, x= y; 1465 1490 int j= 0; 1466 1491 if (!pass) … … 1476 1501 } 1477 1502 } 1478 CFListIterator iter;1479 1503 CFList bufBufFactors; 1480 CanonicalForm bufF; 1481 for (int i= 0; i < length; i++) 1504 CanonicalForm bufF, swap; 1505 CFArray buf; 1506 for (int i= 0; i < lSecondVarLCs; i++) 1482 1507 { 1483 1508 if (!differentSecondVarLCs [i].isEmpty()) … … 1502 1527 bufF= swapvar (bufF, x, z); 1503 1528 bufBufFactors= bufFactors; 1529 evalPoint= CFArray (evaluation.length()  1); 1530 buf= CFArray (evaluation.length()); 1531 iter= evaluation; 1532 int k= evaluation.length()  1; 1533 for (; iter.hasItem(); iter++, k) 1534 buf[k]= iter.getItem(); 1535 swap= buf[z.level()  1]; 1536 buf[z.level()  1]= buf[0]; 1537 buf[0]= 0; 1538 int l= 0; 1539 for (k= 0; k < evaluation.length(); k++) 1540 { 1541 if (buf[k].isZero()) 1542 continue; 1543 evalPoint[l]= buf[k]; 1544 l++; 1545 } 1504 1546 pass= testFactors (bufF, bufBufFactors, alpha, sqrfPartF, bufFactors, 1505 bufSqrfFactors, evalSqrfPartF );1547 bufSqrfFactors, evalSqrfPartF, evalPoint); 1506 1548 if (pass) 1507 1549 { … … 1515 1557 break; 1516 1558 } 1517 if (!pass && i == l ength 1)1559 if (!pass && i == lSecondVarLCs  1) 1518 1560 { 1519 1561 CFList result; … … 1542 1584 1543 1585 bufFactors= factors; 1544 1586 CFList evaluation2; 1587 if (y == x) 1588 evaluation2= evaluation; 1589 else 1590 { 1591 CanonicalForm tmp; 1592 evaluation2= evaluation; 1593 int i= evaluation.length() + 1; 1594 for (CFListIterator iter= evaluation2; iter.hasItem(); iter++, i) 1595 { 1596 if (i == y.level()) 1597 { 1598 tmp= iter.getItem(); 1599 iter.getItem()= evaluation2.getLast(); 1600 evaluation2.removeLast(); 1601 evaluation2.append (tmp); 1602 break; 1603 } 1604 } 1605 } 1606 1607 sqrfPartF= shift2Zero (sqrfPartF, evalSqrfPartF, evaluation2, 1); 1545 1608 if (factors.length() > 1) 1546 1609 { … … 1550 1613 for (int i= 0; i < factors.length(); i++) 1551 1614 leadingCoeffs[i]= LC1; 1615 1552 1616 for (CFListIterator i= factors; i.hasItem(); i++) 1617 { 1618 i.getItem()= i.getItem() (x + evaluation2.getLast(), x); 1553 1619 i.getItem() *= LC1 (0,2)/Lc (i.getItem()); 1620 } 1554 1621 factors.insert (1); 1555 1622 … … 1598 1665 factors= evalSqrfPartF.getLast(); 1599 1666 1600 CFList interMedResult= recoverFactors (evalSqrfPartF.getLast(), factors); 1667 for (CFListIterator iter= factors; iter.hasItem(); iter++) 1668 iter.getItem()= reverseShift (iter.getItem(), evaluation2, 1); 1669 1670 CFList interMedResult= 1671 recoverFactors (reverseShift(evalSqrfPartF.getLast(),evaluation2,1), factors); 1601 1672 1602 1673 CFList result; … … 1633 1704 result.insert (N (F)); 1634 1705 1635 result= distributeContent (result, differentSecondVarLCs, l ength);1706 result= distributeContent (result, differentSecondVarLCs, lSecondVarLCs); 1636 1707 1637 1708 if (!result.getFirst().inCoeffDomain()) … … 1821 1892 CFListIterator iter, iter2; 1822 1893 Variable v; 1823 CFList l, LCs ;1824 CanonicalForm buf;1894 CFList l, LCs, buf; 1895 int pos; 1825 1896 for (int j= 0; j < A.level()  2; j++) 1826 1897 { … … 1844 1915 1845 1916 l= CFList(); 1917 buf= buildUniFactors (Aeval[j], evalPoint, v); 1846 1918 for (iter= uniFactors; iter.hasItem(); iter++) 1847 1919 { 1848 for (iter2= Aeval[j]; iter2.hasItem(); iter2++) 1849 { 1850 buf= mod (iter2.getItem(), v  evalPoint); 1851 buf /= Lc (buf); 1852 if (iter.getItem() == buf) 1853 { 1854 l.append (iter2.getItem()); 1855 break; 1856 } 1857 } 1920 pos= findItem (buf, iter.getItem()); 1921 if (pos) 1922 l.append (getItem (Aeval[j], pos)); 1858 1923 } 1859 1924 Aeval [j]= l; … … 1861 1926 LCs= CFList(); 1862 1927 for (iter= Aeval[j]; iter.hasItem(); iter++) 1863 LCs.append (LC (iter.getItem() (v + evalPoint, v), 1));1928 LCs.append (LC (iter.getItem(), 1)); 1864 1929 normalize (LCs); 1865 1930 Aeval[j]= LCs; … … 1920 1985 1921 1986 void prepareLeadingCoeffs (CFList*& LCs, int n, const CFList& leadingCoeffs, 1922 const CFList& biFactors )1987 const CFList& biFactors, const CFList& evaluation) 1923 1988 { 1924 1989 CFList l= leadingCoeffs; 1925 1990 LCs [n3]= l; 1926 1991 CFListIterator j; 1927 for (int i= n  1; i > 2; i) 1992 CFListIterator iter= evaluation; 1993 for (int i= n  1; i > 2; i, iter++) 1928 1994 { 1929 1995 for (j= l; j.hasItem(); j++) 1930 j.getItem()= j.getItem() ( 0, i + 1);1996 j.getItem()= j.getItem() (iter.getItem(), i + 1); 1931 1997 LCs [i  3]= l; 1932 1998 } 1933 1999 l= LCs [0]; 1934 2000 for (CFListIterator i= l; i.hasItem(); i++) 1935 i.getItem()= i.getItem() ( 0, 3);2001 i.getItem()= i.getItem() (iter.getItem(), 3); 1936 2002 CFListIterator ii= biFactors; 1937 2003 CFList normalizeFactor; … … 2437 2503 biFactorsLCs.append (LC (i.getItem(), 1)); 2438 2504 2439 2440 //shifting to zero2441 A= shift2Zero (A, Aeval, evaluation);2442 2443 CanonicalForm hh= Lc (Aeval.getFirst());2444 2445 for (CFListIterator i= Aeval; i.hasItem(); i++)2446 i.getItem() /= hh;2447 2448 A /= hh;2449 2450 2505 Variable v; 2451 2506 CFList leadingCoeffs= precomputeLeadingCoeff (LC (A, 1), biFactorsLCs, alpha, … … 2479 2534 } 2480 2535 } 2481 Aeval= evaluateAtZero (A); 2482 } 2483 2484 CFListIterator iter= biFactors; 2485 for (; iter.hasItem(); iter++) 2486 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 2487 2536 } 2537 2538 CFListIterator iter; 2488 2539 CanonicalForm oldA= A; 2489 2540 CFList oldBiFactors= biFactors; … … 2492 2543 CanonicalForm tmp= power (leadingCoeffs.getFirst(), biFactors.length()  1); 2493 2544 A *= tmp; 2494 Aeval= evaluateAtZero (A);2495 2545 tmp= leadingCoeffs.getFirst(); 2496 for (int i= A.level(); i > 2; i) 2497 tmp= tmp (0, i); 2546 iter= evaluation; 2547 for (int i= A.level(); i > 2; i, iter++) 2548 tmp= tmp (iter.getItem(), i); 2498 2549 if (!tmp.inCoeffDomain()) 2499 2550 { … … 2504 2555 } 2505 2556 } 2506 hh= Lc (Aeval.getFirst());2507 for (CFListIterator i= Aeval; i.hasItem(); i++)2508 i.getItem() /= hh;2509 2510 A /= hh;2511 2557 } 2512 2558 … … 2515 2561 //prepare leading coefficients 2516 2562 CFList* leadingCoeffs2= new CFList [A.level()  2]; 2517 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, biFactors); 2563 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, biFactors, 2564 evaluation); 2565 2566 Aeval= evaluateAtEval (A, evaluation, 2); 2567 CanonicalForm hh= Lc (Aeval.getFirst()); 2568 for (iter= Aeval; iter.hasItem(); iter++) 2569 iter.getItem() /= hh; 2570 2571 A /= hh; 2572 2573 A= shift2Zero (A, Aeval, evaluation); 2574 2575 for (iter= biFactors; iter.hasItem(); iter++) 2576 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 2577 2578 for (int i= 0; i < A.level()  2; i++) 2579 { 2580 if (i != A.level()  3) 2581 leadingCoeffs2[i]= CFList(); 2582 } 2583 for (iter= leadingCoeffs2[A.level()  3]; iter.hasItem(); iter++) 2584 { 2585 iter.getItem()= shift2Zero (iter.getItem(), list, evaluation); 2586 for (int i= A.level()  4; i > 1; i) 2587 { 2588 if (i + 1 == A.level()  3) 2589 leadingCoeffs2[i].append (iter.getItem() (0, i + 4)); 2590 else 2591 leadingCoeffs2[i].append (leadingCoeffs2[i+1].getLast() (0, i + 4)); 2592 } 2593 } 2518 2594 2519 2595 CFArray Pi; … … 2529 2605 Pi, liftBounds, liftBoundsLength, noOneToOne); 2530 2606 2531 2532 2607 if (!noOneToOne) 2533 2608 { 2534 2609 int check= factors.length(); 2535 A= reverseShift (oldA, evaluation);2610 A= oldA; 2536 2611 factors= recoverFactors (A, factors, evaluation); 2537 2612 if (check != factors.length()) … … 2543 2618 if (noOneToOne) 2544 2619 { 2545 A= oldA; 2546 Aeval= evaluateAtZero (A); 2620 A= shift2Zero (oldA, Aeval, evaluation); 2547 2621 biFactors= oldBiFactors; 2622 for (iter= biFactors; iter.hasItem(); iter++) 2623 iter.getItem()= iter.getItem () (y + evaluation.getLast(), y); 2548 2624 CanonicalForm LCA= LC (Aeval.getFirst(), 1); 2549 2625 CanonicalForm yToLift= power (y, lift); … … 2610 2686 } 2611 2687 } 2612 2613 2614 2688 2615 2689 if (v.level() != 1) 
factory/facFqFactorize.h
r91788c0 reefc3a 518 518 519 519 /// normalize precomputed leading coefficients such that leading coefficients 520 /// evaluated at 0 in K^(n2) equal the leading coeffs wrt Variable(1) of521 /// bivariate factors520 /// evaluated at @a evaluation in K^(n2) equal the leading coeffs wrt 521 /// Variable(1) of bivariate factors 522 522 void 523 523 prepareLeadingCoeffs (CFList*& LCs, ///<[in,out] … … 526 526 const CFList& leadingCoeffs,///<[in] precomputed leading 527 527 ///< coeffs 528 const CFList& biFactors ///<[in] bivariate factors 528 const CFList& biFactors, ///<[in] bivariate factors 529 const CFList& evaluation ///<[in] evaluation point 529 530 ); 530 531 … … 583 584 ); 584 585 586 /// evaluate @a F at @a evaluation 587 /// 588 /// @return @a evaluateAtEval returns a list containing the successive 589 /// evaluations of @a F, last entry is @a F again 590 CFList 591 evaluateAtEval (const CanonicalForm& F, ///<[in] some poly 592 const CFArray& evaluation ///<[in] some evaluation point 593 ); 594 595 /// evaluate @a F at @a evaluation 596 /// 597 /// @return @a evaluateAtEval returns a list containing the successive 598 /// evaluations of @a F starting at level @a l, last entry is @a F again 599 CFList 600 evaluateAtEval (const CanonicalForm& F, ///<[in] some poly 601 const CFList& evaluation,///<[in] some evaluation point 602 int l ///<[in] level to start at 603 ); 604 585 605 #endif 586 606 /* FAC_FQ_FACTORIZE_H */
Note: See TracChangeset
for help on using the changeset viewer.