Changeset 9b25e7e in git for libfac/charset/alg_factor.cc
- Timestamp:
- Oct 24, 2002, 7:22:22 PM (21 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 616214197b0dbd8973606076355c2d6ccde48f2f
- Parents:
- e44bd88b22a2439b301aba30f2adc6bb930bbefc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/alg_factor.cc
re44bd88 r9b25e7e 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: alg_factor.cc,v 1.1 0 2002-08-19 11:11:29Singular Exp $";5 static char * rcsid = "$Id: alg_factor.cc,v 1.11 2002-10-24 17:22:21 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 20 20 #include "alg_factor.h" 21 21 22 //void out_cf(char *s1,const CanonicalForm &f,char *s2);22 void out_cf(char *s1,const CanonicalForm &f,char *s2); 23 23 24 24 #ifdef ALGFACTORDEBUG … … 198 198 Variable X; 199 199 if (getAlgVar(R,X)) 200 { 200 { 201 201 if (R.isUnivariate()) 202 203 else 202 testlist=factorize( R, X ); 203 else 204 204 testlist= Factorize(R, X, 0); 205 205 } 206 else 206 else 207 207 testlist= Factorize(R); 208 208 DEBOUTLN(cout, "testlist= ", testlist); … … 369 369 return alg_lc(f.LC()); 370 370 } 371 } 371 } 372 372 373 373 // the heart of the algorithm: the one from Trager … … 400 400 //cout << "alg: "<< X << " mipo=" << getMipo(X,Variable('X')) <<endl; 401 401 if (R.isUnivariate()) 402 { 403 DEBOUTLN(cout, "alg_factor: factorize( ", R); 402 404 Factorlist = factorize( R, X ); 405 } 403 406 else 404 407 { … … 407 410 CanonicalForm mipo=getMipo(X,XX); 408 411 CFList as(mipo); 412 DEBOUTLN(cout, "alg_factor: newfactoras( ", R); 409 413 Factorlist = newfactoras(R, as , 1); 410 414 #else 411 415 // factor R over k 416 DEBOUTLN(cout, "alg_factor: Factorize( ", R); 412 417 Factorlist = Factorize(R); 413 418 #endif … … 417 422 { 418 423 // factor R over k 424 DEBOUTLN(cout, "alg_factor: Factorize( ", R); 419 425 Factorlist = Factorize(R); 420 426 } … … 444 450 // undo linear transformation!!!! and then gcd! 445 451 //cout << "algcd(" << g << "," << fnew << ",as" << as << ")" << endl; 446 447 452 //out_cf("algcd g=",g,"\n"); 453 //out_cf("algcd fnew=",fnew,"\n"); 448 454 //h= algcd(g,fnew, as, oldord); 449 455 //if (as.length() >1) 450 456 // h= algcd(g,fnew, as, oldord); 451 452 453 454 457 //else 458 h=alg_gcd(g,fnew,as); 459 //out_cf(" -> algcd=",algcd(g,fnew, as, oldord),"\n"); 460 //out_cf(" -> alg_gcd=",alg_gcd(g,fnew,as),"\n"); 455 461 //cout << "algcd result:" << h << endl; 456 462 DEBOUTLN(cout, " alg_factor: h= ", h); … … 647 653 //CanonicalForm Fgcd= algcd(f,f.deriv(),Astar,gcdord); 648 654 CanonicalForm Fgcd; 649 655 //if (Astar.length() >1) 650 656 // Fgcd= algcd(f,f.deriv(),Astar,gcdord); 651 652 653 654 657 //else 658 Fgcd= alg_gcd(f,f.deriv(),Astar); 659 //out_cf("algcd:",algcd(f,f.deriv(),Astar,gcdord),"\n"); 660 //out_cf("alg_gcd:",alg_gcd(f,f.deriv(),Astar),"\n"); 655 661 // cout << "algcd result:" << Fgcd << endl; 656 662 if ( Fgcd == 0 ) DEBOUTMSG(cerr, "WARNING: p'th root ?"); … … 738 744 /* 739 745 $Log: not supported by cvs2svn $ 746 Revision 1.10 2002/08/19 11:11:29 Singular 747 * hannes/pfister: alg_gcd etc. 748 740 749 Revision 1.9 2002/07/30 15:16:19 Singular 741 750 *hannes: fix for alg. extension
Note: See TracChangeset
for help on using the changeset viewer.