Public Member Functions | |
CDFT_base (const unsigned int x_size) | |
CDFT_base (const unsigned int x_size, const mpz_t x_M) | |
virtual | ~CDFT_base () |
int | dftmul (const TPolynom R, const int kR, const TconstPolynom P1, const int k1, const TconstPolynom P2, const int k2) |
Static Public Member Functions | |
static void | get_valid_primes_for (TPolynom &primes, const unsigned int count, const mpz_t Start, const unsigned Depth) |
Protected Member Functions | |
const mpz_t & | invpow2 (const unsigned int i) const |
void | calc_roots_and_inverse () |
void | convolute (const TPolynom p, const unsigned int n) |
Protected Attributes | |
int | size |
mpz_t | M |
Private Attributes | |
mpz_t | h |
mpz_t | inverse [32] |
TPolynom | w |
Friends | |
class | CDFT_chinrem |
Definition at line 118 of file dft.cc.
polynomial::CDFT_base::CDFT_base | ( | const unsigned int | x_size | ) | [inline, explicit] |
polynomial::CDFT_base::CDFT_base | ( | const unsigned int | x_size, | |
const mpz_t | x_M | |||
) | [inline] |
Definition at line 154 of file dft.cc.
References calc_roots_and_inverse(), cout, endl(), h, inverse, M, MARK, polynomial::CDFT_base0::max_size, mpz_init(), mpz_set(), and w.
virtual polynomial::CDFT_base::~CDFT_base | ( | ) | [inline, virtual] |
Definition at line 168 of file dft.cc.
References h, inverse, M, polynomial::CDFT_base0::max_size, mpz_clear(), and w.
void polynomial::CDFT_base::get_valid_primes_for | ( | TPolynom & | primes, | |
const unsigned int | count, | |||
const mpz_t | Start, | |||
const unsigned | Depth | |||
) | [static] |
Definition at line 348 of file dft.cc.
References cerr, cout, endl(), exit(), numtheory::is_prime(), M, MARK, mpz_add(), mpz_add_ui(), mpz_clear(), mpz_cmp_ui(), mpz_fdiv_ui(), mpz_init(), mpz_mul_2exp(), mpz_mul_ui(), mpz_probab_prime_p(), mpz_set(), mpz_set_ui(), and mpz_sizeinbase().
Referenced by polynomial::CDFT_chinrem::calc_field_and_roots_and_inverse(), and polynomial::CDFT::calc_field_and_roots_and_inverse().
const mpz_t& polynomial::CDFT_base::invpow2 | ( | const unsigned int | i | ) | const [inline, protected] |
Definition at line 136 of file dft.cc.
References inverse.
Referenced by dftmul(), and polynomial::CDFT::internal_mul().
void polynomial::CDFT_base::calc_roots_and_inverse | ( | ) | [protected] |
Definition at line 516 of file dft.cc.
References cerr, endl(), exit(), h, inverse, M, MARK, polynomial::CDFT_base0::max_size, mpz_add_ui(), mpz_clear(), mpz_cmp_ui(), mpz_init(), mpz_invert(), mpz_mod(), mpz_mul(), mpz_powm(), mpz_powm_ui(), mpz_probab_prime_p(), mpz_set(), mpz_set_ui(), mpz_sub_ui(), and w.
Referenced by polynomial::CDFT::calc_field_and_roots_and_inverse(), and CDFT_base().
void polynomial::CDFT_base::convolute | ( | const TPolynom | p, | |
const unsigned int | n | |||
) | [protected] |
Definition at line 576 of file dft.cc.
References h, M, polynomial::CDFT_base0::max_size, mpz_add(), mpz_mod(), mpz_mul(), mpz_mul_2exp(), mpz_sub(), mpz_swap(), and w.
Referenced by dftmul(), and polynomial::CDFT::internal_mul().
int polynomial::CDFT_base::dftmul | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P1, | |||
const int | k1, | |||
const TconstPolynom | P2, | |||
const int | k2 | |||
) |
Definition at line 629 of file dft.cc.
References cerr, convolute(), cout, endl(), exit(), h, invpow2(), M, MARK, mpz_clear(), mpz_init2(), mpz_mod(), mpz_mul(), mpz_set(), mpz_set_ui(), mpz_sizeinbase(), mpz_swap(), size, and polynomial::CDFT_base0::use_size().
Referenced by polynomial::CDFT_chinrem::recurse_dftmul().
friend class CDFT_chinrem [friend] |
mpz_t polynomial::CDFT_base::h [private] |
Definition at line 128 of file dft.cc.
Referenced by calc_roots_and_inverse(), CDFT_base(), convolute(), dftmul(), and ~CDFT_base().
mpz_t polynomial::CDFT_base::inverse[32] [private] |
Definition at line 129 of file dft.cc.
Referenced by calc_roots_and_inverse(), CDFT_base(), invpow2(), and ~CDFT_base().
TPolynom polynomial::CDFT_base::w [private] |
Definition at line 130 of file dft.cc.
Referenced by calc_roots_and_inverse(), CDFT_base(), convolute(), and ~CDFT_base().
int polynomial::CDFT_base::size [protected] |
Definition at line 133 of file dft.cc.
Referenced by dftmul(), and polynomial::CDFT::internal_mul().
mpz_t polynomial::CDFT_base::M [protected] |
Definition at line 134 of file dft.cc.
Referenced by polynomial::CDFT::calc_field_and_roots_and_inverse(), calc_roots_and_inverse(), CDFT_base(), convolute(), polynomial::CDFT_chinrem::create_nodes(), dftmul(), get_valid_primes_for(), polynomial::CDFT::internal_mul(), polynomial::CDFT_chinrem::recurse_dftmul(), and ~CDFT_base().