Changeset ea0a9d in git for factory/libfac/charset/alg_factor.cc
 Timestamp:
 Mar 12, 2014, 2:17:29 PM (10 years ago)
 Branches:
 (u'spielwiese', '873fc1222e995d7cb33f79d8f1792ce418c8c72c')
 Children:
 ac2c3043b7a7c6fd15fe58c2089a7df5c1daf4ad
 Parents:
 574650d154909eac6bd00ddec8f7f5ff0828b7a7
 gitauthor:
 Martin Lee <martinlee84@web.de>20140312 14:17:29+01:00
 gitcommitter:
 Hans Schoenemann <hannes@mathematik.unikl.de>20140317 18:31:55+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/libfac/charset/alg_factor.cc
r574650 rea0a9d 580 580 // K must have more than S elements (>thesis, > getextension) 581 581 static CFList 582 simpleextension(const CFList & Astar, const Variable & Extension, bool& isFunctionField, 582 simpleextension(CFList& backSubst, const CFList & Astar, 583 const Variable & Extension, bool& isFunctionField, 583 584 CanonicalForm & R) 584 585 { … … 612 613 oldR= R; 613 614 sqrf_norm (i.getItem(), R, Extension, s, g, R); 615 616 backSubst.insert (s); 614 617 615 618 Off (SW_RATIONAL); … … 729 732 } 730 733 734 CanonicalForm 735 backSubst (const CanonicalForm& F, const CFList& a, const CFList& b) 736 { 737 ASSERT (a.length() == b.length()  1, "wrong length of lists in backSubst"); 738 CanonicalForm result= F; 739 Variable tmp; 740 CFList tmp2= b; 741 tmp= tmp2.getLast().mvar(); 742 tmp2.removeLast(); 743 for (CFListIterator iter= a; iter.hasItem(); iter++) 744 { 745 result= result (tmp+iter.getItem()*tmp2.getLast().mvar(), tmp); 746 tmp= tmp2.getLast().mvar(); 747 tmp2.removeLast(); 748 } 749 return result; 750 } 751 731 752 // the heart of the algorithm: the one from Trager 732 753 #ifndef DEBUGOUTPUT … … 740 761 CFFList L, Factorlist; 741 762 CanonicalForm R, Rstar, s, g, h, f= F; 742 CFList substlist ;763 CFList substlist, backSubsts; 743 764 744 765 DEBINCLEVEL(CERR,"alg_factor"); 745 766 DEBOUTLN(CERR, "alg_factor: f= ", f); 746 767 747 //out_cf("start alg_factor:",f,"\n"); 748 substlist= simpleextension(Astar, vminpoly, isFunctionField, Rstar); 768 substlist= simpleextension (backSubsts, Astar, vminpoly, isFunctionField, Rstar); 749 769 DEBOUTLN(CERR, "alg_factor: substlist= ", substlist); 750 770 DEBOUTLN(CERR, "alg_factor: minpoly Rstar= ", Rstar); … … 768 788 h= replacevar (h, alpha, Rstar.mvar()); 769 789 h *= bCommonDen(h); 790 h= backSubst (h, backSubsts, Astar); 770 791 h= Prem (h, as); 771 792 L.append (CFFactor (h, i.getItem().exp())); … … 846 867 { 847 868 g= divide (g, h, Rstarlist); 869 h= backSubst (h, backSubsts, Astar); 848 870 h= Prem (h, as); 849 871 h *= bCommonDen (h);
Note: See TracChangeset
for help on using the changeset viewer.