Changeset 3d6980b in git for factory/cf_factor.cc
- Timestamp:
- Jun 19, 2020, 4:22:49 PM (3 years ago)
- Branches:
- (u'spielwiese', '379ec2d037299db64c43fe3550b5ba8fe508dbe5')
- Children:
- bbec92425869780b8ebb03d87d31a00eabbfec85
- Parents:
- 4c1fc06f2d81e12a8e75a5419444cb157fbe45e9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_factor.cc
r4c1fc0 r3d6980b 478 478 #ifdef HAVE_NTL 479 479 { 480 // USENTL480 // use NTL 481 481 if (fac_NTL_char != getCharacteristic()) 482 482 { … … 507 507 #endif 508 508 } 509 else 509 else // char p, multivariate 510 510 { 511 511 #if defined(HAVE_NTL) … … 563 563 fmpz_poly_factor_clear (result); 564 564 fmpz_poly_clear (f1); 565 } 566 if ( ! ic.isOne() ) 567 { 568 if ( F.getFirst().factor().inCoeffDomain() ) 565 if ( ! ic.isOne() ) 569 566 { 567 // according to convertFLINTfmpz_polyfactor2FcaCFFlist, 568 // first entry is in CoeffDomain 570 569 CFFactor new_first( F.getFirst().factor() * ic ); 571 570 F.removeFirst(); 572 571 F.insert( new_first ); 573 572 } 574 else575 F.insert( CFFactor( ic ) );576 573 } 577 574 goto end_char0; 578 575 #elif defined(HAVE_NTL) 579 576 { 580 // USENTL577 //use NTL 581 578 ZZ c; 582 579 vec_pair_ZZX_long factors; … … 586 583 //convert the result back to Factory 587 584 F=convertNTLvec_pair_ZZX_long2FacCFFList(factors,c,fz.mvar()); 588 } 589 if ( ! ic.isOne() ) 590 { 591 if ( F.getFirst().factor().inCoeffDomain() ) 585 if ( ! ic.isOne() ) 592 586 { 587 // according to convertNTLvec_pair_ZZX_long2FacCFFList 588 // first entry is in CoeffDomain 593 589 CFFactor new_first( F.getFirst().factor() * ic ); 594 590 F.removeFirst(); 595 F.insert( new_first );596 }597 else598 F.insert( CFFactor( ic ) );599 }600 else601 {602 if ( !F.getFirst().factor().inCoeffDomain() )603 {604 CFFactor new_first( 1 );605 591 F.insert( new_first ); 606 592 } … … 612 598 #endif 613 599 } 614 else // not univariate, char 0600 else // multivariate, char 0 615 601 { 616 602 On (SW_RATIONAL); … … 644 630 if ( ! cd.isOne() ) 645 631 { 646 if ( F.getFirst().factor().inCoeffDomain() ) 647 { 648 CFFactor new_first( F.getFirst().factor() / cd ); 649 F.removeFirst(); 650 F.insert( new_first ); 651 } 652 else 653 { 654 F.insert( CFFactor( 1/cd ) ); 655 } 632 CFFactor new_first( F.getFirst().factor() / cd ); 633 F.removeFirst(); 634 F.insert( new_first ); 656 635 } 657 636 } … … 773 752 #endif 774 753 #if !defined(HAVE_NTL) && !defined(HAVE_FLINT) 775 factoryError ("univariate factorization depends on NTL(missing)");754 factoryError ("univariate factorization depends on FLINT/NTL(missing)"); 776 755 return CFFList (CFFactor (f, 1)); 777 #endif //HAVE_NTL778 } 779 else 756 #endif 757 } 758 else // char p, multivariate 780 759 { 781 760 #ifdef HAVE_NTL
Note: See TracChangeset
for help on using the changeset viewer.