Changeset 03c742 in git for factory/cf_irred.cc
- Timestamp:
- Jun 26, 2020, 6:03:59 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- f87a54f01779194a0163ca39873f5b4255a4f510
- Parents:
- b666c768103c724ed3617954c684de0e621144d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_irred.cc
rb666c7 r03c742 14 14 #ifdef HAVE_NTL 15 15 #include "NTLconvert.h" 16 #endif 17 18 #ifdef HAVE_FLINT 19 #include "FLINTconvert.h" 16 20 #endif 17 21 … … 36 40 } 37 41 38 #if def HAVE_NTL42 #if defined(HAVE_NTL) || defined(HAVE_FLINT) 39 43 /// computes a random monic irreducible univariate polynomial in x over Fp of 40 /// degree i via NTL 44 /// degree i via NTL/FLINT 41 45 CanonicalForm 42 46 randomIrredpoly (int i, const Variable & x) 43 47 { 44 48 int p= getCharacteristic(); 49 #ifdef HAVE_FLINT 50 nmod_poly_t Irredpoly; 51 nmod_poly_init(Irredpoly,p); 52 nmod_poly_randtest_monic_irreducible(Irredpoly, FLINTrandom, i+1); 53 CanonicalForm CFirredpoly=convertnmod_poly_t2FacCF(Irredpoly,Variable(1)); 54 nmod_poly_clear(Irredpoly); 55 #elif defined(HAVE_NTL) 45 56 if (fac_NTL_char != p) 46 57 { … … 49 60 } 50 61 zz_pX NTLirredpoly; 51 CanonicalForm CFirredpoly;52 62 BuildIrred (NTLirredpoly, i); 53 CFirredpoly= convertNTLzzpX2CF (NTLirredpoly, x); 63 CanonicalForm CFirredpoly= convertNTLzzpX2CF (NTLirredpoly, x); 64 #endif 54 65 return CFirredpoly; 55 66 }
Note: See TracChangeset
for help on using the changeset viewer.