Changeset 45e474 in git


Ignore:
Timestamp:
Dec 16, 2013, 5:47:14 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
84ac5994873dbb564fbbae08f3f16a378f8abfa0
Parents:
0ebf2c731d149c10e2377cfd061cddf19c85502b
git-author:
Martin Lee <martinlee84@web.de>2013-12-16 17:47:14+01:00
git-committer:
Martin Lee <martinlee84@web.de>2014-01-20 16:45:03+01:00
Message:
chg: use FLINT to factorize polys over Fq in facFqBivar
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    r0ebf2c r45e474  
    163163          "univariate polynomial expected or constant expected");
    164164  CFFList factorsA;
     165#ifndef HAVE_FLINT
    165166  if (fac_NTL_char != getCharacteristic())
    166167  {
     
    168169    zz_p::init (getCharacteristic());
    169170  }
     171#endif
    170172  if (GF)
    171173  {
     
    178180    if (getCharacteristic() > 2)
    179181    {
     182#if (HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
     183      nmod_poly_t FLINTmipo, leadingCoeff;
     184      fq_nmod_ctx_t fq_con;
     185      fq_nmod_poly_t FLINTA;
     186      fq_nmod_poly_factor_t FLINTFactorsA;
     187
     188      nmod_poly_init (FLINTmipo, getCharacteristic());
     189      convertFacCF2nmod_poly_t (FLINTmipo, mipo.mapinto());
     190
     191      fq_nmod_ctx_init_modulus (fq_con, FLINTmipo, "Z");
     192
     193      convertFacCF2Fq_nmod_poly_t (FLINTA, A, fq_con);
     194      fq_nmod_poly_make_monic (FLINTA, FLINTA, fq_con);
     195
     196      fq_nmod_poly_factor_init (FLINTFactorsA, fq_con);
     197      nmod_poly_init (leadingCoeff, getCharacteristic());
     198
     199      fq_nmod_poly_factor (FLINTFactorsA, leadingCoeff, FLINTA, fq_con);
     200
     201      factorsA= convertFLINTFq_nmod_poly_factor2FacCFFList (FLINTFactorsA, x, beta, fq_con);
     202
     203      fq_nmod_poly_factor_clear (FLINTFactorsA, fq_con);
     204      fq_nmod_poly_clear (FLINTA, fq_con);
     205      nmod_poly_clear (FLINTmipo);
     206      nmod_poly_clear (leadingCoeff);
     207      fq_nmod_ctx_clear (fq_con);
     208#else
    180209      zz_pX NTLMipo= convertFacCF2NTLzzpX (mipo.mapinto());
    181210      zz_pE::init (NTLMipo);
     
    186215      factorsA= convertNTLvec_pair_zzpEX_long2FacCFFList (NTLFactorsA, multi,
    187216                                                         x, beta);
     217#endif
    188218    }
    189219    else
     
    210240    if (getCharacteristic() > 2)
    211241    {
     242#if (HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
     243      nmod_poly_t FLINTmipo, leadingCoeff;
     244      fq_nmod_ctx_t fq_con;
     245      fq_nmod_poly_t FLINTA;
     246      fq_nmod_poly_factor_t FLINTFactorsA;
     247
     248      nmod_poly_init (FLINTmipo, getCharacteristic());
     249      convertFacCF2nmod_poly_t (FLINTmipo, getMipo (alpha));
     250
     251      fq_nmod_ctx_init_modulus (fq_con, FLINTmipo, "Z");
     252
     253      convertFacCF2Fq_nmod_poly_t (FLINTA, A, fq_con);
     254      fq_nmod_poly_make_monic (FLINTA, FLINTA, fq_con);
     255
     256      fq_nmod_poly_factor_init (FLINTFactorsA, fq_con);
     257      nmod_poly_init (leadingCoeff, getCharacteristic());
     258
     259      fq_nmod_poly_factor (FLINTFactorsA, leadingCoeff, FLINTA, fq_con);
     260
     261      factorsA= convertFLINTFq_nmod_poly_factor2FacCFFList (FLINTFactorsA, x, alpha, fq_con);
     262
     263      fq_nmod_poly_factor_clear (FLINTFactorsA, fq_con);
     264      fq_nmod_poly_clear (FLINTA, fq_con);
     265      nmod_poly_clear (FLINTmipo);
     266      nmod_poly_clear (leadingCoeff);
     267      fq_nmod_ctx_clear (fq_con);
     268#else
    212269      zz_pX NTLMipo= convertFacCF2NTLzzpX (getMipo (alpha));
    213270      zz_pE::init (NTLMipo);
     
    218275      factorsA= convertNTLvec_pair_zzpEX_long2FacCFFList (NTLFactorsA, multi,
    219276                                                           x, alpha);
     277#endif
    220278    }
    221279    else
Note: See TracChangeset for help on using the changeset viewer.