Changeset 070c1b4 in git for libfac/factor/Factor.cc
- Timestamp:
- Jul 9, 2012, 1:54:06 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 16055bd66cbe17a643cdc139b5ad13307053b068
- Parents:
- 9e472371c48294d093be833766189740f0ddd8f0
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-07-09 13:54:06+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-08-03 10:03:18+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/factor/Factor.cc
r9e47237 r070c1b4 27 27 28 28 #include "alg_factor.h" 29 void out_cf(c har *s1,const CanonicalForm &f,char *s2);29 void out_cf(const char *s1,const CanonicalForm &f,const char *s2); 30 30 void out_cff(CFFList &L); 31 31 … … 62 62 else 63 63 { 64 bool repl=(f.mvar() != alpha);65 64 //out_cf("f2 - factor:",f,"\n"); 66 65 //out_cf("f2 - ext:",alpha,"\n"); … … 68 67 Variable X=rootOf(mipo); 69 68 CanonicalForm F=f; 70 if (repl)F=replacevar(f,alpha,X);69 F=replacevar(f,alpha,X); 71 70 //out_cf("call - factor:",F,"\n"); 72 71 //out_cf("call - ext:",X,"\n"); … … 74 73 CFFList L=factorize(F,X); 75 74 CFFListIterator i=L; 76 if (repl)77 75 { 78 76 CFFList Outputlist; … … 83 81 i.getItem().exp())); 84 82 } 83 //out_cff(Outputlist); 85 84 return Outputlist; 86 85 } 87 else return L;88 86 } 89 87 } … … 466 464 467 465 static int 468 specializePoly(const CanonicalForm & f, Variable & Extension, int deg, SFormList & Substitutionlist, int i,int j){ 466 specializePoly(const CanonicalForm & f, Variable & Extension, int deg, SFormList & Substitutionlist, int i,int j) 467 { 469 468 Variable minpoly= Extension; 470 469 int ok,extended= degree(Extension), working_over_extension; … … 475 474 // First try: 476 475 ok = try_specializePoly(f,minpoly,deg,Substitutionlist,i,j); 477 while ( ! ok ){ // we have to extend! 476 while ( ! ok ) // we have to extend! 477 { 478 SFormList origS=Substitutionlist; 478 479 extended+= 1; 479 if ( ! working_over_extension ){ 480 if ( ! working_over_extension ) 481 { 480 482 minpoly= rootOf(generate_mipo( extended,Extension )); 481 483 Extension= minpoly; 482 484 ok= try_specializePoly(f,minpoly,deg,Substitutionlist,i,j); 485 if (!ok) 486 { 487 Substitutionlist=origS; 488 // very bad hack: TODO 489 // we want to remove the newly created variable minpoly: 490 extern char *var_names_ext; 491 var_names_ext[strlen(var_names_ext)]='\0'; 492 } 483 493 } 484 494 else
Note: See TracChangeset
for help on using the changeset viewer.