Changeset a090c88 in git
 Timestamp:
 Feb 16, 2012, 4:26:41 PM (11 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 667ba13dd7bcac6f144c71d80aad80c7fe86c3cd
 Parents:
 583cb9fa220ca5d883a84c81ca72035b15d62ec1
 gitauthor:
 Martin Lee <martinlee84@web.de>20120216 16:26:41+01:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20120404 14:42:25+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facHensel.cc
r583cb9 ra090c88 503 503 henselStep12 (const CanonicalForm& F, const CFList& factors, 504 504 CFArray& bufFactors, const CFList& diophant, CFMatrix& M, 505 CFArray& Pi, int j )505 CFArray& Pi, int j, const modpk& b) 506 506 { 507 507 CanonicalForm E; … … 519 519 } 520 520 521 if (b.getp() != 0) 522 E= b(E); 521 523 CFArray buf= CFArray (diophant.length()); 522 524 bufFactors[0]= mod (factors.getFirst(), power (F.mvar(), j + 1)); … … 529 531 { 530 532 if (k > 0) 531 remainder= modNTL (E, bufFactors[k] [0] );533 remainder= modNTL (E, bufFactors[k] [0], b); 532 534 else 533 535 remainder= E; 534 536 } 535 537 else 536 remainder= modNTL (E, bufFactors[k] );537 538 buf[k]= mulNTL (i.getItem(), remainder );538 remainder= modNTL (E, bufFactors[k], b); 539 540 buf[k]= mulNTL (i.getItem(), remainder, b); 539 541 if (degree (bufFactors[k], x) > 0) 540 buf[k]= modNTL (buf[k], bufFactors[k] [0] );541 else 542 buf[k]= modNTL (buf[k], bufFactors[k] );542 buf[k]= modNTL (buf[k], bufFactors[k] [0], b); 543 else 544 buf[k]= modNTL (buf[k], bufFactors[k], b); 543 545 } 544 546 for (k= 1; k < factors.length(); k++) 547 { 545 548 bufFactors[k] += xToJ*buf[k]; 549 if (b.getp() != 0) 550 bufFactors[k]= b(bufFactors[k]); 551 } 546 552 547 553 // update Pi [0] … … 549 555 int degBuf1= degree (bufFactors[1], x); 550 556 if (degBuf0 > 0 && degBuf1 > 0) 551 M (j + 1, 1)= mulNTL (bufFactors[0] [j], bufFactors[1] [j] );557 M (j + 1, 1)= mulNTL (bufFactors[0] [j], bufFactors[1] [j], b); 552 558 CanonicalForm uIZeroJ; 553 559 if (j == 1) … … 555 561 if (degBuf0 > 0 && degBuf1 > 0) 556 562 uIZeroJ= mulNTL ((bufFactors[0] [0] + bufFactors[0] [j]), 557 (bufFactors[1] [0] + buf[1]) )  M(1, 1)  M(j + 1, 1);563 (bufFactors[1] [0] + buf[1]), b)  M(1, 1)  M(j + 1, 1); 558 564 else if (degBuf0 > 0) 559 uIZeroJ= mulNTL (bufFactors[0] [j], bufFactors[1] );565 uIZeroJ= mulNTL (bufFactors[0] [j], bufFactors[1], b); 560 566 else if (degBuf1 > 0) 561 uIZeroJ= mulNTL (bufFactors[0], buf[1] );567 uIZeroJ= mulNTL (bufFactors[0], buf[1], b); 562 568 else 563 569 uIZeroJ= 0; 570 if (b.getp() != 0) 571 uIZeroJ= b (uIZeroJ); 564 572 Pi [0] += xToJ*uIZeroJ; 573 if (b.getp() != 0) 574 Pi [0]= b (Pi[0]); 565 575 } 566 576 else … … 568 578 if (degBuf0 > 0 && degBuf1 > 0) 569 579 uIZeroJ= mulNTL ((bufFactors[0] [0] + bufFactors[0] [j]), 570 (bufFactors[1] [0] + buf[1]) )  M(1, 1)  M(j + 1, 1);580 (bufFactors[1] [0] + buf[1]), b)  M(1, 1)  M(j + 1, 1); 571 581 else if (degBuf0 > 0) 572 uIZeroJ= mulNTL (bufFactors[0] [j], bufFactors[1] );582 uIZeroJ= mulNTL (bufFactors[0] [j], bufFactors[1], b); 573 583 else if (degBuf1 > 0) 574 uIZeroJ= mulNTL (bufFactors[0], buf[1] );584 uIZeroJ= mulNTL (bufFactors[0], buf[1], b); 575 585 else 576 586 uIZeroJ= 0; 587 if (b.getp() != 0) 588 uIZeroJ= b (uIZeroJ); 577 589 Pi [0] += xToJ*uIZeroJ; 590 if (b.getp() != 0) 591 Pi [0]= b (Pi[0]); 578 592 } 579 593 CFArray tmp= CFArray (factors.length()  1); … … 593 607 { 594 608 tmp[0] += mulNTL ((bufFactors[0][k]+one.coeff()), (bufFactors[1][k]+ 595 two.coeff()) )  M (k + 1, 1)  M (j  k + 2, 1);609 two.coeff()), b)  M (k + 1, 1)  M (j  k + 2, 1); 596 610 one++; 597 611 two++; … … 599 613 else if (one.hasTerms() && one.exp() == j  k + 1) 600 614 { 601 tmp[0] += mulNTL ((bufFactors[0][k]+one.coeff()), bufFactors[1][k] )602 M (k + 1, 1);615 tmp[0] += mulNTL ((bufFactors[0][k]+one.coeff()), bufFactors[1][k], b) 616  M (k + 1, 1); 603 617 one++; 604 618 } 605 619 else if (two.hasTerms() && two.exp() == j  k + 1) 606 620 { 607 tmp[0] += mulNTL (bufFactors[0][k], (bufFactors[1][k]+two.coeff()) )608 M (k + 1, 1);621 tmp[0] += mulNTL (bufFactors[0][k], (bufFactors[1][k]+two.coeff()), b) 622  M (k + 1, 1); 609 623 two++; 610 624 } … … 616 630 } 617 631 } 632 if (b.getp() != 0) 633 tmp[0]= b (tmp[0]); 618 634 Pi [0] += tmp[0]*xToJ*F.mvar(); 619 635 … … 625 641 degBuf= degree (bufFactors[l + 1], x); 626 642 if (degPi > 0 && degBuf > 0) 627 M (j + 1, l + 1)= mulNTL (Pi [l  1] [j], bufFactors[l + 1] [j] );643 M (j + 1, l + 1)= mulNTL (Pi [l  1] [j], bufFactors[l + 1] [j], b); 628 644 if (j == 1) 629 645 { 630 646 if (degPi > 0 && degBuf > 0) 631 647 Pi [l] += xToJ*(mulNTL (Pi [l  1] [0] + Pi [l  1] [j], 632 bufFactors[l + 1] [0] + buf[l + 1] )  M (j + 1, l +1) 648 bufFactors[l + 1] [0] + buf[l + 1], b)  M (j + 1, l +1)  633 649 M (1, l + 1)); 634 650 else if (degPi > 0) 635 Pi [l] += xToJ*(mulNTL (Pi [l  1] [j], bufFactors[l + 1] ));651 Pi [l] += xToJ*(mulNTL (Pi [l  1] [j], bufFactors[l + 1], b)); 636 652 else if (degBuf > 0) 637 Pi [l] += xToJ*(mulNTL (Pi [l  1], buf[l + 1] ));653 Pi [l] += xToJ*(mulNTL (Pi [l  1], buf[l + 1], b)); 638 654 } 639 655 else … … 641 657 if (degPi > 0 && degBuf > 0) 642 658 { 643 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1] [0] );644 uIZeroJ += mulNTL (Pi [l  1] [0], buf [l + 1] );659 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1] [0], b); 660 uIZeroJ += mulNTL (Pi [l  1] [0], buf [l + 1], b); 645 661 } 646 662 else if (degPi > 0) 647 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1] );663 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1], b); 648 664 else if (degBuf > 0) 649 665 { 650 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1] [0] );651 uIZeroJ += mulNTL (Pi [l  1], buf[l + 1] );666 uIZeroJ= mulNTL (uIZeroJ, bufFactors [l + 1] [0], b); 667 uIZeroJ += mulNTL (Pi [l  1], buf[l + 1], b); 652 668 } 653 669 Pi[l] += xToJ*uIZeroJ; … … 659 675 if (degBuf > 0 && degPi > 0) 660 676 { 661 tmp[l] += mulNTL (two.coeff(), bufFactors[l + 1][0] );677 tmp[l] += mulNTL (two.coeff(), bufFactors[l + 1][0], b); 662 678 two++; 663 679 } 664 680 else if (degPi > 0) 665 681 { 666 tmp[l] += mulNTL (two.coeff(), bufFactors[l + 1] );682 tmp[l] += mulNTL (two.coeff(), bufFactors[l + 1], b); 667 683 two++; 668 684 } … … 678 694 { 679 695 tmp[l] += mulNTL ((bufFactors[l+1][k] + one.coeff()), (Pi[l1][k] + 680 two.coeff()))  M (k + 1, l + 1)  M (j  k + 2, l + 1);696 two.coeff()),b)  M (k + 1, l + 1)  M (j  k + 2, l + 1); 681 697 one++; 682 698 two++; … … 684 700 else if (one.hasTerms() && one.exp() == j  k + 1) 685 701 { 686 tmp[l] += mulNTL ((bufFactors[l+1][k]+one.coeff()), Pi[l1][k] ) 702 tmp[l] += mulNTL ((bufFactors[l+1][k]+one.coeff()), Pi[l1][k], b)  687 703 M (k + 1, l + 1); 688 704 one++; … … 690 706 else if (two.hasTerms() && two.exp() == j  k + 1) 691 707 { 692 tmp[l] += mulNTL (bufFactors[l+1][k], (Pi[l1][k] + two.coeff()) ) 693 M (k + 1, l + 1);708 tmp[l] += mulNTL (bufFactors[l+1][k], (Pi[l1][k] + two.coeff()), b) 709  M (k + 1, l + 1); 694 710 two++; 695 711 } … … 699 715 } 700 716 } 717 if (b.getp() != 0) 718 tmp[l]= b (tmp[l]); 701 719 Pi[l] += tmp[l]*xToJ*F.mvar(); 702 720 } … … 712 730 Pi= CFArray (factors.length()  1); 713 731 CFListIterator j= factors; 714 diophant= diophantine (F[0], factors );732 diophant= diophantine (F[0], factors, b); 715 733 DEBOUTLN (cerr, "diophant= " << diophant); 716 734 j++; 717 Pi [0]= mulNTL (j.getItem(), mod (factors.getFirst(), F.mvar()) );735 Pi [0]= mulNTL (j.getItem(), mod (factors.getFirst(), F.mvar()), b); 718 736 M (1, 1)= Pi [0]; 719 737 int i= 1; … … 722 740 for (; j.hasItem(); j++, i++) 723 741 { 724 Pi [i]= mulNTL (Pi [i  1], j.getItem() );742 Pi [i]= mulNTL (Pi [i  1], j.getItem(), b); 725 743 M (1, i + 1)= Pi [i]; 726 744 } … … 735 753 } 736 754 for (i= 1; i < l; i++) 737 henselStep12 (F, factors, bufFactors, diophant, M, Pi, i );755 henselStep12 (F, factors, bufFactors, diophant, M, Pi, i, b); 738 756 739 757 CFListIterator k= factors; … … 760 778 } 761 779 for (i= start; i < end; i++) 762 henselStep12 (F, factors, bufFactors, diophant, M, Pi, i );780 henselStep12 (F, factors, bufFactors, diophant, M, Pi, i, b); 763 781 764 782 CFListIterator k= factors;
Note: See TracChangeset
for help on using the changeset viewer.