Changeset 4505ca in git
- Timestamp:
- Jan 10, 2013, 11:03:33 AM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 3163a2e6bdf16d80875b60e58d864a97a416776a
- Parents:
- 9b4920bf5fea321634ffb39fa954b2f172285c58
- git-author:
- Martin Lee <martinlee84@web.de>2013-01-10 11:03:33+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2013-02-18 15:01:09+01:00
- Location:
- factory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFactorize.cc
r9b4920b r4505ca 427 427 //prepare leading coefficients 428 428 CFList* leadingCoeffs2= new CFList [lengthAeval2]; 429 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, biFactors, 430 evaluation); 431 432 CFListIterator iter; 433 434 Aeval= evaluateAtEval (A, evaluation, 2); 435 436 CanonicalForm hh= 1/Lc (Aeval.getFirst()); 437 438 for (iter= Aeval; iter.hasItem(); iter++) 439 iter.getItem() *= hh; 440 441 A *= hh; 442 443 CFListIterator iter2; 429 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(), leadingCoeffs, 430 biFactors, evaluation); 431 432 CFListIterator iter2, iter; 444 433 CFList bufLeadingCoeffs2= leadingCoeffs2[lengthAeval2-1]; 445 434 bufBiFactors= biFactors; … … 541 530 for (int i= lengthAeval2-1; i > -1; i--) 542 531 leadingCoeffs2[i]= CFList(); 543 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, 544 biFactors, evaluation ); 545 Aeval= evaluateAtEval (A, evaluation, 2); 546 547 hh= 1/Lc (Aeval.getFirst()); 548 549 for (iter2= Aeval; iter2.hasItem(); iter2++) 550 iter2.getItem() *= hh; 551 552 A *= hh; 532 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(), 533 leadingCoeffs, biFactors, evaluation); 553 534 break; 554 535 } … … 684 665 for (int i= lengthAeval2-1; i > -1; i--) 685 666 leadingCoeffs2[i]= CFList(); 686 prepareLeadingCoeffs (leadingCoeffs2,A.level(),leadingCoeffs, biFactors, 687 evaluation); 688 Aeval= evaluateAtEval (A, evaluation, 2); 689 690 hh= 1/Lc (Aeval.getFirst()); 691 692 for (CFListIterator i= Aeval; i.hasItem(); i++) 693 i.getItem() *= hh; 694 695 A *= hh; 667 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(),leadingCoeffs, 668 biFactors, evaluation); 696 669 } 697 670 factors= CFList(); … … 722 695 for (int i= lengthAeval2-1; i > -1; i--) 723 696 leadingCoeffs2[i]= CFList(); 724 prepareLeadingCoeffs (leadingCoeffs2,A.level(),leadingCoeffs, biFactors, 725 evaluation); 726 Aeval= evaluateAtEval (A, evaluation, 2); 727 728 hh= 1/Lc (Aeval.getFirst()); 729 730 for (CFListIterator i= Aeval; i.hasItem(); i++) 731 i.getItem() *= hh; 732 733 A *= hh; 697 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(),leadingCoeffs, 698 biFactors, evaluation); 734 699 735 700 if (!fdivides (LC (oldA,1),prod (leadingCoeffs2[lengthAeval2-1]))) -
factory/facFqFactorize.cc
r9b4920b r4505ca 2199 2199 } 2200 2200 2201 void prepareLeadingCoeffs (CFList*& LCs, int n, const CFList& leadingCoeffs, 2202 const CFList& biFactors, const CFList& evaluation) 2201 void 2202 prepareLeadingCoeffs (CFList*& LCs, CanonicalForm& A, CFList& Aeval, int n, 2203 const CFList& leadingCoeffs, const CFList& biFactors, 2204 const CFList& evaluation) 2203 2205 { 2204 2206 CFList l= leadingCoeffs; … … 2225 2227 j.getItem() *= ii.getItem(); 2226 2228 } 2229 2230 Aeval= evaluateAtEval (A, evaluation, 2); 2231 2232 CanonicalForm hh= 1/Lc (Aeval.getFirst()); 2233 2234 for (iter= Aeval; iter.hasItem(); iter++) 2235 iter.getItem() *= hh; 2236 2237 A *= hh; 2227 2238 } 2228 2239 … … 2927 2938 //prepare leading coefficients 2928 2939 CFList* leadingCoeffs2= new CFList [lengthAeval2]; 2929 prepareLeadingCoeffs (leadingCoeffs2, A .level(), leadingCoeffs, biFactors,2940 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(), leadingCoeffs, biFactors, 2930 2941 evaluation); 2931 2942 2932 CFListIterator iter; 2933 Aeval= evaluateAtEval (A, evaluation, 2); 2934 CanonicalForm hh= 1/Lc (Aeval.getFirst()); 2935 for (iter= Aeval; iter.hasItem(); iter++) 2936 iter.getItem() *= hh; 2937 2938 A *= hh; 2939 2940 2941 CFListIterator iter2; 2943 CFListIterator iter2, iter; 2942 2944 CFList bufLeadingCoeffs2= leadingCoeffs2[lengthAeval2-1]; 2943 2945 bufBiFactors= biFactors; … … 3044 3046 for (int i= lengthAeval2-1; i > -1; i--) 3045 3047 leadingCoeffs2[i]= CFList(); 3046 prepareLeadingCoeffs (leadingCoeffs2, A.level(), leadingCoeffs, 3047 biFactors, evaluation ); 3048 Aeval= evaluateAtEval (A, evaluation, 2); 3049 3050 hh= 1/Lc (Aeval.getFirst()); 3051 3052 for (iter2= Aeval; iter2.hasItem(); iter2++) 3053 iter2.getItem() *= hh; 3054 3055 A *= hh; 3048 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(), 3049 leadingCoeffs, biFactors, evaluation); 3056 3050 break; 3057 3051 } … … 3188 3182 for (int i= lengthAeval2-1; i > -1; i--) 3189 3183 leadingCoeffs2[i]= CFList(); 3190 prepareLeadingCoeffs (leadingCoeffs2,A.level(),leadingCoeffs, biFactors, 3191 evaluation); 3192 Aeval= evaluateAtEval (A, evaluation, 2); 3193 3194 hh= 1/Lc (Aeval.getFirst()); 3195 3196 for (CFListIterator i= Aeval; i.hasItem(); i++) 3197 i.getItem() *= hh; 3198 3199 A *= hh; 3184 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(),leadingCoeffs, 3185 biFactors, evaluation); 3200 3186 } 3201 3187 factors= CFList(); … … 3226 3212 for (int i= lengthAeval2-1; i > -1; i--) 3227 3213 leadingCoeffs2[i]= CFList(); 3228 prepareLeadingCoeffs (leadingCoeffs2,A.level(),leadingCoeffs, biFactors, 3229 evaluation); 3230 Aeval= evaluateAtEval (A, evaluation, 2); 3231 3232 hh= 1/Lc (Aeval.getFirst()); 3233 3234 for (CFListIterator i= Aeval; i.hasItem(); i++) 3235 i.getItem() *= hh; 3236 3237 A *= hh; 3214 prepareLeadingCoeffs (leadingCoeffs2, A, Aeval, A.level(),leadingCoeffs, 3215 biFactors, evaluation); 3238 3216 3239 3217 if (!fdivides (LC (oldA,1),prod (leadingCoeffs2[lengthAeval2-1]))) -
factory/facFqFactorize.h
r9b4920b r4505ca 608 608 /// normalize precomputed leading coefficients such that leading coefficients 609 609 /// evaluated at @a evaluation in K^(n-2) equal the leading coeffs wrt 610 /// Variable(1) of bivariate factors 610 /// Variable(1) of bivariate factors and change @a A and @a Aeval accordingly 611 611 void 612 prepareLeadingCoeffs (CFList*& LCs, ///<[in,out] 612 prepareLeadingCoeffs (CFList*& LCs, ///<[in,out] 613 CanonicalForm& A, ///<[in,out] 614 CFList& Aeval, ///<[in,out] 613 615 int n, ///<[in] level of poly to be 614 616 ///< factored
Note: See TracChangeset
for help on using the changeset viewer.