StaticFactorbase.H

Go to the documentation of this file.
00001 
00006 #ifndef STFB_HEADER_
00007 #define STFB_HEADER_
00008 
00009 #include "qsieve-fwd.H"
00010 
00011 #include "mpz_wrapper.H"
00012 using namespace my_mpz_wrapper;
00013 
00014 #include "modulo.H"
00015 
00016 
00017 class StaticFactorbase : public StaticFactorbaseSettings
00018 {
00019  public:
00020   static int NumberOf_more_PrimePowers; // actual number (will be evaluated at runtime)
00021   static int FB_maxQuadrate; // actual number of squares to sieve with (will be evaluated at runtime)
00022 
00023  protected:
00024   static int PrimePowers[StaticFactorbase::max_additional_Powers];
00025   static int PrimePowerReciprocals[StaticFactorbase::max_additional_Powers];
00026   static int SQRT_kN_of_PrimeNumbers[MaxSize];
00027   static int SQRT_kN_of_PrimePowers[StaticFactorbase::max_additional_Powers];
00028   static int SQRT_kN_of_PrimeSquares[StaticFactorbase::MaxSize];
00029 
00030  public:
00031   static void compute_StaticFactorbase();
00032 };
00033 
00034 
00035 extern mpz_t kN; // input for MPQS (includes a suitable multiplier)
00036 extern int MPQS_Multiplier; // multiplier for n (kN=MPQS_Multiplier*n), will be determined later!
00037 extern int LogicalSieveSize; // sieving interval will be [-LogicalSieveSize,LogicalSieveSize] for each MPQS polynomial
00038 
00039 
00040 inline int SQRT_kN_mod_PrimeNumber(const unsigned int Primzahl)
00041 {
00042   return numtheory::sqrtmod(mpz_remainder_ui(kN,Primzahl),Primzahl);
00043 }
00044 
00045 int check_SQRT_kN_mod_PrimeNumber(const int Primzahl);
00046 
00047 void determine_best_MPQS_Multiplier(const mpz_t n, mpz_t kN, int &new_MPQS_Multiplier);
00048 
00049 #endif /* STFB_HEADER_ */

Generated on Wed Nov 7 23:29:26 2007 for Qsieve by  doxygen 1.5.4