[dea3d2] | 1 | /*****************************************************************************\ |
---|
| 2 | * Computer Algebra System SINGULAR |
---|
| 3 | \*****************************************************************************/ |
---|
[a85670b] | 4 | /** @file facAbsBiFact.h |
---|
[dea3d2] | 5 | * |
---|
[058c1d] | 6 | * bivariate absolute factorization over Q described in "Modular Las Vegas |
---|
| 7 | * Algorithms for Polynomial Absolute Factorization" by Bertone, ChÚze, Galligo |
---|
[dea3d2] | 8 | * |
---|
| 9 | * @author Martin Lee |
---|
| 10 | * |
---|
| 11 | **/ |
---|
| 12 | /*****************************************************************************/ |
---|
| 13 | |
---|
[a85670b] | 14 | #ifndef FAC_ABS_BI_FACT_H |
---|
| 15 | #define FAC_ABS_BI_FACT_H |
---|
[dea3d2] | 16 | |
---|
[4e76a6] | 17 | #include "canonicalform.h" |
---|
[efd410] | 18 | |
---|
[592154] | 19 | #ifdef HAVE_NTL |
---|
[6fcd65b] | 20 | /// main absolute factorization routine, expects bivariate poly which is |
---|
[5cfbda] | 21 | /// irreducible over Q |
---|
[6fcd65b] | 22 | /// |
---|
[44cd9a] | 23 | /// @return absBiFactorizeMain returns a list whose entries contain three |
---|
| 24 | /// entities: |
---|
[6fcd65b] | 25 | /// an absolute irreducible factor, an irreducible univariate polynomial |
---|
| 26 | /// that defines the minimal field extension over which the irreducible |
---|
[5cfbda] | 27 | /// factor is defined (note: in case the factor is already defined over |
---|
| 28 | /// Q[t]/(t), 1 is returned as defining poly), and the |
---|
| 29 | /// multiplicity of the absolute irreducible factor |
---|
[73c222] | 30 | CFAFList absBiFactorizeMain (const CanonicalForm& F, ///<[in] s.a. |
---|
[44cd9a] | 31 | bool full= false ///<[in] true if all |
---|
| 32 | ///< factors should be |
---|
| 33 | ///< returned |
---|
[73c222] | 34 | ); |
---|
[592154] | 35 | #endif |
---|
[6fcd65b] | 36 | |
---|
| 37 | /// normalize factors, i.e. make factors monic |
---|
[efd410] | 38 | static inline |
---|
| 39 | void normalize (CFAFList & L) |
---|
| 40 | { |
---|
| 41 | for (CFAFListIterator i= L; i.hasItem(); i++) |
---|
| 42 | i.getItem()= CFAFactor (i.getItem().factor()/Lc (i.getItem().factor()), |
---|
| 43 | i.getItem().minpoly(), i.getItem().exp()); |
---|
| 44 | } |
---|
| 45 | |
---|
[6fcd65b] | 46 | /// univariate absolute factorization over Q |
---|
| 47 | /// |
---|
| 48 | /// @return uniAbsFactorize returns a list whose entries contain three entities: |
---|
| 49 | /// an absolute irreducible factor, an irreducible univariate polynomial |
---|
| 50 | /// that defines the minimal field extension over which the irreducible |
---|
[5cfbda] | 51 | /// factor is defined (note: in case the factor is already defined over |
---|
| 52 | /// Q[t]/(t), 1 is returned as defining poly), and the multiplicity of |
---|
| 53 | /// the absolute irreducible factor |
---|
[44cd9a] | 54 | CFAFList uniAbsFactorize (const CanonicalForm& F, ///<[in] univariate poly |
---|
| 55 | ///< irreducible over Q |
---|
| 56 | bool full= false ///<[in] true if all factors |
---|
| 57 | ///< should be returned |
---|
[73c222] | 58 | ); |
---|
[dea3d2] | 59 | |
---|
| 60 | #endif |
---|