Changeset 03c742 in git for factory/facFqBivar.cc


Ignore:
Timestamp:
Jun 26, 2020, 6:03:59 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f87a54f01779194a0163ca39873f5b4255a4f510
Parents:
b666c768103c724ed3617954c684de0e621144d2
Message:
factory: BuildIrred, FLINT/NTL seperation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    rb666c7 r03c742  
    3939#ifdef HAVE_NTL
    4040#include "NTLconvert.h"
     41#endif
    4142
    4243#ifdef HAVE_FLINT
     
    7980}
    8081
     82#if defined(HAVE_NTL) || defined(HAVE_FLINT)
    8183CanonicalForm evalPoint (const CanonicalForm& F, CanonicalForm & eval,
    8284                         const Variable& alpha, CFList& list, const bool& GF,
     
    170172    Variable beta= rootOf (mipo.mapinto());
    171173    CanonicalForm buf= GF2FalphaRep (A, beta);
     174#ifdef HAVE_NTL   
    172175    if (getCharacteristic() > 2)
     176#else
     177    if (getCharacteristic() > 0)
     178#endif
    173179    {
    174180#if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
     
    215221#endif
    216222    }
     223#ifdef HAVE_NTL   
    217224    else
    218225    {
     
    226233                                                           x, beta);
    227234    }
     235#endif   
    228236    setCharacteristic (getCharacteristic(), k, cGFName);
    229237    for (CFFListIterator i= factorsA; i.hasItem(); i++)
     
    237245  else if (alpha.level() != 1)
    238246  {
     247#ifdef HAVE_NTL 
    239248    if (getCharacteristic() > 2)
     249#else
     250    if (getCharacteristic() > 0)
     251#endif
    240252    {
    241253#if (HAVE_FLINT && __FLINT_RELEASE >= 20400)
     
    282294#endif
    283295    }
     296#ifdef HAVE_NTL
    284297    else
    285298    {
     
    293306                                                           x, alpha);
    294307    }
     308#endif   
    295309  }
    296310  else
    297311  {
    298312#ifdef HAVE_FLINT
     313#ifdef HAVE_NTL
    299314    if (degree (A) < 300)
     315#endif   
    300316    {
    301317      nmod_poly_t FLINTA;
     
    310326      nmod_poly_clear (FLINTA);
    311327    }
     328#ifdef HAVE_NTL
    312329    else
    313330#endif
     331#endif /* HAVE_FLINT */
     332#ifdef HAVE_NTL
    314333    if (getCharacteristic() > 2)
    315334    {
     
    334353                                                          x);
    335354    }
     355#endif
    336356  }
    337357  CFList uniFactors;
     
    780800Variable chooseExtension (const Variable & alpha, const Variable& beta, int k)
    781801{
     802  #if 0//#ifdef HAVE_NTL
    782803  if (fac_NTL_char != getCharacteristic())
    783804  {
     
    786807  }
    787808  zz_pX NTLIrredpoly;
     809  #elif defined(HAVE_FLINT)
     810  nmod_poly_t Irredpoly;
     811  nmod_poly_init(Irredpoly,getCharacteristic());
     812  #endif
    788813  int i=1, m= 2;
    789814  // extension of F_p needed
     
    808833    i= degree (getMipo (alpha))/m + 1;
    809834  }
     835  #if 0 //#ifdef HAVE_NTL
    810836  BuildIrred (NTLIrredpoly, i*m);
    811837  CanonicalForm newMipo= convertNTLzzpX2CF (NTLIrredpoly, Variable (1));
     838  #elif defined(HAVE_FLINT)
     839  nmod_poly_randtest_monic_irreducible(Irredpoly,FLINTrandom,i*m+1);
     840  CanonicalForm newMipo= convertnmod_poly_t2FacCF(Irredpoly,Variable (1));
     841  #endif
    812842  return rootOf (newMipo);
    813843}
     
    11121142}
    11131143
     1144#ifdef HAVE_NTL // henselLift12
    11141145CFList
    11151146henselLiftAndEarly (CanonicalForm& A, bool& earlySuccess, CFList&
     
    14121443  return bufUniFactors;
    14131444}
    1414 
     1445#endif
     1446
     1447#ifdef HAVE_NTL // henselLiftAndEarly
    14151448CFList
    14161449henselLiftAndEarly (CanonicalForm& A, bool& earlySuccess, CFList&
     
    14241457                             uniFactors, info, eval, dummy, den);
    14251458}
     1459#endif
    14261460
    14271461#ifndef HAVE_FLINT
     
    14621496}
    14631497#endif
    1464 
     1498 
     1499#ifdef HAVE_NTL // mat_zz_pE
    14651500long isReduced (const mat_zz_pE& M)
    14661501{
     
    14791514  return 1;
    14801515}
     1516#endif
    14811517
    14821518#ifndef HAVE_FLINT
     
    15321568#endif
    15331569
     1570#ifdef HAVE_NTL // mat_zz_pE
    15341571int * extractZeroOneVecs (const mat_zz_pE& M)
    15351572{
     
    15551592  return result;
    15561593}
    1557 
     1594#endif
     1595
     1596#ifdef HAVE_NTL // mat_zz_pE
    15581597void
    15591598reconstructionTry (CFList& reconstructedFactors, CanonicalForm& F, const CFList&
     
    16371676    F= bufF (y+eval,y);
    16381677}
     1678#endif
    16391679
    16401680#ifndef HAVE_FLINT
     
    18061846#endif
    18071847
     1848#ifdef HAVE_NTL //mat_zz_pE
    18081849CFList
    18091850reconstruction (CanonicalForm& G, CFList& factors, int* zeroOneVecs, int
     
    18541895  return result;
    18551896}
    1856 
     1897#endif
     1898
     1899#ifdef HAVE_NTL // mat_zz_pE
    18571900CFList
    18581901monicReconstruction (CanonicalForm& G, CFList& factors, int* zeroOneVecs,
     
    19051948  return result;
    19061949}
     1950#endif
    19071951
    19081952#ifndef HAVE_FLINT
     
    24312475
    24322476#ifndef HAVE_FLINT
     2477#ifdef HAVE_NTL // logarithmicDerivative
    24332478//over Fp
    24342479int
     
    25542599}
    25552600#endif
    2556 
    2557 #ifdef HAVE_FLINT
     2601#endif
     2602
     2603#ifdef HAVE_FLINT
     2604#ifdef HAVE_NTL // henselLift12
    25582605int
    25592606liftAndComputeLattice (const CanonicalForm& F, int* bounds, int sizeBounds, int
     
    26912738}
    26922739#endif
     2740#endif
    26932741
    26942742#ifndef HAVE_FLINT
     2743#ifdef HAVE_NTL //logarithmicDerivative
    26952744//over field extension
    26962745int
     
    28892938}
    28902939#endif
    2891 
    2892 #ifdef HAVE_FLINT
     2940#endif
     2941
     2942#ifdef HAVE_FLINT
     2943#ifdef HAVE_NTL // henselLift12
    28932944//over field extension
    28942945int
     
    30973148}
    30983149#endif
     3150#endif
    30993151
    31003152// over Fq
     3153#ifdef HAVE_NTL
    31013154int
    31023155liftAndComputeLattice (const CanonicalForm& F, int* bounds, int sizeBounds,
     
    32303283  return l;
    32313284}
    3232 
     3285#endif
     3286
     3287#ifdef HAVE_NTL // henselLift12
    32333288#ifdef HAVE_FLINT
    32343289int
     
    34123467  return l;
    34133468}
    3414 
     3469#endif
     3470
     3471#ifdef HAVE_NTL // logarithmicDerivative
    34153472CFList
    34163473increasePrecision (CanonicalForm& F, CFList& factors, int factorsFound,
     
    36193676  return CFList();
    36203677}
    3621 
     3678#endif
     3679
     3680#ifdef HAVE_NTL // mat_zz_pE
    36223681CFList
    36233682increasePrecision (CanonicalForm& F, CFList& factors, int factorsFound,
     
    37583817  return CFList();
    37593818}
    3760 
     3819#endif
     3820
     3821#ifdef HAVE_NTL // logarithmicDerivative
    37613822//over field extension
    37623823CFList
     
    40654126  return CFList();
    40664127}
    4067 
     4128#endif
     4129
     4130#ifdef HAVE_NTL // mat_zz_pE
    40684131CFList
    40694132increasePrecision2 (const CanonicalForm& F, CFList& factors,
     
    41964259  return CFList();
    41974260}
    4198 
     4261#endif
     4262
     4263#ifdef HAVE_NTL // logarithmicDerivative
    41994264CFList
    42004265increasePrecisionFq2Fp (CanonicalForm& F, CFList& factors, int factorsFound,
     
    44044469  return CFList();
    44054470}
    4406 
     4471#endif
     4472
     4473#ifdef HAVE_NTL // logarithmicDerivative
    44074474#ifdef HAVE_FLINT
    44084475CFList
     
    45724639  return result;
    45734640}
    4574 
     4641#endif
     4642
     4643#ifdef HAVE_NTL // mat_zz_pE
    45754644CFList
    45764645increasePrecision (CanonicalForm& F, CFList& factors, int oldL, int
     
    46774746  return result;
    46784747}
     4748#endif
    46794749
    46804750//over field extension
     4751#ifdef HAVE_NTL // logarithmicDerivative
    46814752#ifdef HAVE_FLINT
    46824753CFList
     
    49345005  return result;
    49355006}
    4936 
     5007#endif
     5008
     5009#ifdef HAVE_NTL // logarithmicDerivative
    49375010#ifdef HAVE_FLINT
    49385011CFList
     
    50925165  return result;
    50935166}
    5094 
     5167#endif
     5168
     5169#ifdef HAVE_NTL // logarithmicDerivative
    50955170#ifdef HAVE_FLINT
    50965171CFList
     
    53255400  return CFList();
    53265401}
     5402#endif
    53275403
    53285404//Fq
     5405#ifdef HAVE_NTL
    53295406CFList
    53305407furtherLiftingAndIncreasePrecision (CanonicalForm& F, CFList&
     
    54705547  return CFList();
    54715548}
     5549#endif
    54725550
    54735551//over field extension
     5552#ifdef HAVE_NTL // logarithmicDerivative
    54745553#ifdef HAVE_FLINT
    54755554CFList
     
    57855864  return CFList();
    57865865}
    5787 
     5866#endif
     5867
     5868#ifdef HAVE_NTL // logarithmicDerivative
    57885869#ifdef HAVE_FLINT
    57895870CFList
     
    60186099  return CFList();
    60196100}
     6101#endif
    60206102
    60216103#ifndef HAVE_FLINT
     
    60526134
    60536135#ifdef HAVE_FLINT
     6136#ifdef HAVE_NTL // henselLift12
    60546137void
    60556138refineAndRestartLift (const CanonicalForm& F, const nmod_mat_t FLINTN, int
     
    60826165}
    60836166#endif
    6084 
     6167#endif
     6168
     6169#ifdef HAVE_NTL // mat_zz_pE
    60856170void
    60866171refineAndRestartLift (const CanonicalForm& F, const mat_zz_pE& NTLN, int
     
    61126197  henselLift12 (F, factors, l, Pi, diophant, M);
    61136198}
     6199#endif
    61146200
    61156201#ifdef HAVE_FLINT
     
    63276413}
    63286414
     6415#ifdef HAVE_NTL // mat_zz_pE
    63296416CFList
    63306417earlyReconstructionAndLifting (const CanonicalForm& F, const mat_zz_pE& N,
     
    64836570  return result;
    64846571}
     6572#endif
    64856573
    64866574//over field extension
     
    66686756}
    66696757
     6758#ifdef HAVE_NTL // henselLift12
    66706759CFList
    66716760sieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern&
     
    67126801  }
    67136802}
    6714 
     6803#endif
     6804
     6805#ifdef HAVE_NTL // henselLift12
    67156806CFList
    67166807extSieveSmallFactors (const CanonicalForm& G, CFList& uniFactors, DegreePattern&
     
    67606851  }
    67616852}
    6762 
     6853#endif
     6854
     6855#ifdef HAVE_NTL // matrix Fq
    67636856CFList
    67646857henselLiftAndLatticeRecombi (const CanonicalForm& G, const CFList& uniFactors,
     
    75567649  }
    75577650}
    7558 
     7651#endif
     7652
     7653#ifdef HAVE_NTL //primitiveElement
    75597654ExtensionInfo
    75607655init4ext (const ExtensionInfo& info, const CanonicalForm& evaluation,
     
    76097704  return info2;
    76107705}
    7611 
     7706#endif
     7707
     7708#ifdef HAVE_NTL // init4ext
    76127709CFList
    76137710extHenselLiftAndLatticeRecombi(const CanonicalForm& G, const CFList& uniFactors,
     
    81938290  }
    81948291}
    8195 
     8292#endif
     8293
     8294#ifdef HAVE_NTL // henselLiftAndLatticeRecombi
    81968295CFList
    81978296extBiFactorize (const CanonicalForm& F, const ExtensionInfo& info);
     
    88218920  return factors;
    88228921}
    8823 
     8922#endif
     8923
     8924#ifdef HAVE_NTL // primitiveElement
    88248925CFList
    88258926extBiFactorize (const CanonicalForm& F, const ExtensionInfo& info)
     
    89959096  }
    89969097}
    8997 
    8998 #endif
    8999 /* HAVE_NTL */
    9000 
    9001 
     9098#endif
     9099#endif
Note: See TracChangeset for help on using the changeset viewer.