Changeset 5f9b47 in git for factory/facFactorize.h
 Timestamp:
 Oct 13, 2011, 4:28:33 PM (12 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 a6423611ab89e02788fee9f049f4e6b2e2dac782
 Parents:
 c79a9d3a83d34151b67ba9ac3b63b827a07b792f
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facFactorize.h
rc79a9d r5f9b47 34 34 /// element is the leading coefficient. 35 35 inline 36 CFList ratSqrfFactorize (const CanonicalForm & F, ///< [in] a multivariate poly36 CFList ratSqrfFactorize (const CanonicalForm & G, ///< [in] a multivariate poly 37 37 const Variable& v 38 38 ) 39 39 { 40 if (getNumVars (F) == 2) 41 return ratBiSqrfFactorize (F, v); 40 if (getNumVars (G) == 2) 41 return ratBiSqrfFactorize (G, v); 42 CanonicalForm F= G; 43 if (isOn (SW_RATIONAL)) 44 F *= bCommonDen (F); 42 45 CFList result= multiFactorize (F, v); 43 46 if (isOn (SW_RATIONAL)) … … 54 57 /// multiplicity, the first element is the leading coefficient. 55 58 inline 56 CFFList ratFactorize (const CanonicalForm& F, ///< [in] a multivariate poly59 CFFList ratFactorize (const CanonicalForm& G, ///< [in] a multivariate poly 57 60 const Variable& v 58 61 ) 59 62 { 60 if (getNumVars ( F) == 2)63 if (getNumVars (G) == 2) 61 64 { 62 CFFList result= ratBiFactorize ( F,v);65 CFFList result= ratBiFactorize (G,v); 63 66 return result; 64 67 } 65 Variable a= Variable (1);68 CanonicalForm F= G; 66 69 CanonicalForm LcF= Lc (F); 70 if (isOn (SW_RATIONAL)) 71 F *= bCommonDen (F); 67 72 68 CanonicalForm sqrfP= sqrfPart (F);69 CFList buf;70 73 CFFList result; 71 buf= multiFactorize (sqrfP, v); 72 CanonicalForm G= F; 73 result= multiplicity (G, buf); 74 CFFList sqrfFactors= sqrFree (F); 75 for (CFFListIterator i= sqrfFactors; i.hasItem(); i++) 76 { 77 CFList tmp= ratSqrfFactorize (i.getItem().factor(), v); 78 for (CFListIterator j= tmp; j.hasItem(); j++) 79 { 80 if (j.getItem().inCoeffDomain()) continue; 81 result.append (CFFactor (j.getItem(), i.getItem().exp())); 82 } 83 } 74 84 if (isOn (SW_RATIONAL)) 75 85 {
Note: See TracChangeset
for help on using the changeset viewer.