#include <gmp.h>
#include <string>
#include "utils.H"
#include "mpz_wrapper.H"
Go to the source code of this file.
Functions | |
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 | fermat_like_method () |
factoring method similar to fermat | |
void | phimat (mpz_t n) |
factoring methods something between fermat and phi | |
void | phimat2 () |
void | easy_factor () |
trial division and a combination of other methods | |
Variables | |
bool | SkipFermat |
bool | UsePhimat |
bool | SkipPhi |
bool | SkipFibonacci |
bool | SkipEasyECM |
bool | SkipECM |
int | rho_Phase |
int | phi_Phase1 |
double | phi_Phase2 |
double | elcu_Phase1 |
double | elcu_Phase2 |
int | elcu_Kurven |
Definition in file easy_factor.H.
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().
void fermat_like_method | ( | ) |
factoring method similar to fermat
Definition at line 7 of file fermat.cc.
References cout, endl(), Factorization_to_file, fermat_like_method(), flush(), MAL(), mpz_add(), mpz_add_ui(), mpz_clear(), mpz_cmp_ui(), mpz_divexact(), mpz_gcd(), mpz_init(), mpz_mul(), mpz_mul_ui(), mpz_perfect_square_p(), mpz_pow_ui(), mpz_probab_prime_p(), my_mpz_wrapper::mpz_remainder_ui(), mpz_set_ui(), mpz_sizeinbase(), mpz_sqrt(), mpz_sub(), mpz_swap(), n, Potenztest(), and my_mpz_wrapper::probab_prime_checks.
Referenced by easy_factor(), and fermat_like_method().
void phimat | ( | mpz_t | n | ) |
factoring methods something between fermat and phi
Definition at line 711 of file fermat.cc.
References cout, endl(), Factorization_to_file, flush(), MAL(), mpz_add(), mpz_add_ui(), mpz_clear(), mpz_cmp(), mpz_cmp_ui(), mpz_init(), mpz_mul(), mpz_mul_ui(), mpz_powm(), mpz_probab_prime_p(), mpz_scan1(), mpz_set_ui(), mpz_sqrt(), mpz_sub(), mpz_tdiv_q_2exp(), and my_mpz_wrapper::probab_prime_checks.
void phimat2 | ( | ) |
Definition at line 536 of file fermat.cc.
References allowed_memory_usage_KB(), entry::Base, cerr, cout, lambda_delta::Delta_by_ratio(), endl(), exit(), Factorization_to_file, flush(), phimahashvecs::found(), phimahashvecs::Intervalsize(), MAL(), phimahashvecs::max_size(), MIN(), mpz_add(), mpz_add_ui(), mpz_clear(), mpz_cmp(), mpz_cmp_ui(), mpz_divexact(), mpz_gcd(), mpz_init(), mpz_init_set(), mpz_init_set_ui(), mpz_invert(), mpz_mod(), mpz_mul(), mpz_mul_ui(), mpz_powm(), mpz_powm_ui(), mpz_probab_prime_p(), my_mpz_wrapper::mpz_remainder_ui(), mpz_set(), mpz_set_ui(), mpz_sqrt(), mpz_sub(), mpz_sub_ui(), n, Potenztest(), phimahashvecs::prepare(), and my_mpz_wrapper::probab_prime_checks.
Referenced by easy_factor().
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().
int elcu_Kurven |
Definition at line 27 of file ConfigFile.cc.
Referenced by Cprocess_clients::process_data_stream_ecm(), process_ecm(), tune_parameters(), and statistical_data::XML_StatusReport().
double elcu_Phase1 |
Definition at line 25 of file ConfigFile.cc.
Referenced by main(), Cprocess_clients::process_data_stream_ecm(), process_ecm(), tune_parameters(), and statistical_data::XML_StatusReport().
double elcu_Phase2 |
Definition at line 26 of file ConfigFile.cc.
Referenced by main(), Cprocess_clients::process_data_stream_ecm(), process_ecm(), tune_parameters(), and statistical_data::XML_StatusReport().
int phi_Phase1 |
double phi_Phase2 |
int rho_Phase |
bool SkipEasyECM |
bool SkipECM |
bool SkipFermat |
bool SkipFibonacci |
bool SkipPhi |
bool UsePhimat |