#include "easy_factor.H"
#include <cmath>
#include "modulo.H"
#include "elliptic_curve.H"
#include <sstream>
#include <fstream>
#include "pollard_phi.cc"
#include "fibonacci_ppm1.cc"
#include "fermat.cc"
Go to the source code of this file.
Classes | |
class | ExitManager |
manages the ordered exiting of the program More... | |
Functions | |
std::string | MAL (const mpz_t factor, const std::ostringstream &comment) |
std::string | MAL (const mpz_t factor, const unsigned int exponent, const std::ostringstream &comment) |
std::string | MAL (const mpz_t factor, const unsigned int exponent=1) |
std::string | MAL (const unsigned long int factor, const unsigned int exponent=1) |
void | tune_parameters (const unsigned int Dezimalstellen) |
bool | compiled_IS_STANDALONE () |
void | pollard (const int runden) |
Pollard-rho method. | |
bool | try_memorized_factors (mpz_t n, const std::string &memfilename) |
trial division by some factors given in a file... | |
bool | Potenztest (const mpz_t n) |
check for perfect powers | |
void | easy_factor () |
trial division and a combination of other methods | |
Variables | |
std::ofstream | Factorization_to_file |
Definition in file easy_factor.cc.
bool compiled_IS_STANDALONE | ( | ) |
void easy_factor | ( | ) |
trial division and a combination of other methods
Definition at line 184 of file easy_factor.cc.
References cerr, compiled_IS_STANDALONE(), cout, endl(), exit(), exp(), fermat_like_method(), fibonacci_ppm1, std::basic_ofstream< _CharT, _Traits >::flush(), elliptic_curves::go(), MAL(), MARK, mpz_cmp_ui(), mpz_divexact_ui(), mpz_divisible_ui_p(), mpz_probab_prime_p(), mpz_set_ui(), mpz_sizeinbase(), n, phi_Phase1, phi_Phase2, phimat2(), pollard(), pollard_phi, Potenztest(), my_mpz_wrapper::probab_prime_checks, rho_Phase, SkipEasyECM, SkipFermat, SkipFibonacci, SkipPhi, ExitManager::StopFactorization(), try_memorized_factors(), tune_parameters(), and UsePhimat.
Referenced by main().
std::string MAL | ( | const unsigned long int | factor, | |
const unsigned int | exponent = 1 | |||
) |
Definition at line 116 of file FactorFound.cc.
References TFoundFactors::AutoSave(), FoundFactors, and myMAL().
std::string MAL | ( | const mpz_t | factor, | |
const unsigned int | exponent = 1 | |||
) |
Definition at line 86 of file FactorFound.cc.
References TFoundFactors::AutoSave(), FoundFactors, and myMAL().
std::string MAL | ( | const mpz_t | factor, | |
const unsigned int | exponent, | |||
const std::ostringstream & | comment | |||
) |
Definition at line 96 of file FactorFound.cc.
References TFoundFactors::AutoSave(), FoundFactors, myMAL(), and std::basic_ostringstream< _CharT, _Traits, _Alloc >::str().
std::string MAL | ( | const mpz_t | factor, | |
const std::ostringstream & | comment | |||
) |
Definition at line 107 of file FactorFound.cc.
References TFoundFactors::AutoSave(), FoundFactors, myMAL(), and std::basic_ostringstream< _CharT, _Traits, _Alloc >::str().
Referenced by CRelation::ComputeQuadraticCongruence(), easy_factor(), elliptic_curves::factor_found(), fermat_like_method(), phimat(), phimat2(), pollard(), polphi_template(), Potenztest(), Cprocess_clients::process_data_stream(), Cprocess_clients::process_data_stream_ecm(), process_ecm(), and try_memorized_factors().
void pollard | ( | const int | runden | ) |
Pollard-rho method.
Definition at line 38 of file easy_factor.cc.
References cout, endl(), exp(), flush(), Cusr_signal_proxy::got_SIGUSR1(), Cusr_signal_proxy::got_SIGUSR2(), MAL(), mpz_add_ui(), mpz_clear(), mpz_cmp(), mpz_cmp_ui(), mpz_gcd(), mpz_init(), mpz_mod(), mpz_mul(), mpz_probab_prime_p(), mpz_remove(), mpz_set(), mpz_set_ui(), mpz_sub(), n, and my_mpz_wrapper::probab_prime_checks.
Referenced by easy_factor().
bool Potenztest | ( | const mpz_t | n | ) |
check for perfect powers
Definition at line 153 of file easy_factor.cc.
References cout, endl(), flush(), MAL(), mpz_clear(), mpz_init(), mpz_probab_prime_p(), mpz_root(), mpz_sizeinbase(), and my_mpz_wrapper::probab_prime_checks.
Referenced by CRelation::ComputeQuadraticCongruence(), easy_factor(), fermat_like_method(), phimat2(), Cprocess_clients::process_data_stream(), Cprocess_clients::process_data_stream_ecm(), and process_ecm().
bool try_memorized_factors | ( | mpz_t | n, | |
const std::string & | memfilename | |||
) |
trial division by some factors given in a file...
Definition at line 88 of file easy_factor.cc.
References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), cerr, cout, endl(), flush(), isspace(), MAL(), mpz_clear(), mpz_cmp(), mpz_divexact(), mpz_divisible_p(), mpz_init(), mpz_probab_prime_p(), and my_mpz_wrapper::probab_prime_checks.
Referenced by easy_factor().
void tune_parameters | ( | const unsigned int | Dezimalstellen | ) |
Definition at line 310 of file ConfigFile.cc.
References cerr, cin, ConfigFile, cout, elcu_Kurven, elcu_Phase1, elcu_Phase2, endl(), exit(), Factor_Threshold, LogicalSieveSize, MARK, MAX(), StaticFactorbaseSettings::MaxSize, phi_Phase1, phi_Phase2, PhysicalSieveSize, rho_Phase, setprecision(), StaticFactorbaseSettings::Size(), and StaticFactorbaseSettings::Size_StaticFactorbase.
Referenced by easy_factor(), main(), Cprocess_clients::process_data_stream_ecm(), and process_ecm().
Definition at line 52 of file ConfigFile.cc.
Referenced by CRelation::ComputeQuadraticCongruence(), elliptic_curves::factor_found(), fermat_like_method(), main(), phimat(), phimat2(), polphi_template(), Cprocess_clients::process_data_stream(), Cprocess_clients::process_data_stream_ecm(), and process_ecm().