Public Member Functions | |
CDFT (const unsigned int x_size, const mpz_t x_N) | |
virtual | ~CDFT () |
const mpz_t & | get_N (void) const |
int | mul (const TPolynom R, const int kR, const TconstPolynom P1, const int k1, const TconstPolynom P2, const int k2) |
int | mulmod (const TPolynom R, const int kR, const TconstPolynom P1, const int k1, const TconstPolynom P2, const int k2) |
int | square (const TPolynom R, const int kR, const TconstPolynom P, const int k) |
int | squaremod (const TPolynom R, const int kR, const TconstPolynom P, const int k) |
Protected Member Functions | |
int | internal_mul (const TPolynom R, const int kR, const TconstPolynom P1, const int k1, const TconstPolynom P2, const int k2, const bool reduce_result_modN) |
Private Member Functions | |
void | calc_field_and_roots_and_inverse () |
Private Attributes | |
mpz_t | N |
Definition at line 188 of file dft.cc.
polynomial::CDFT::CDFT | ( | const unsigned int | x_size, | |
const mpz_t | x_N | |||
) | [inline] |
Definition at line 208 of file dft.cc.
References calc_field_and_roots_and_inverse(), cout, endl(), MARK, polynomial::CDFT_base0::max_size, mpz_init_set(), and N.
virtual polynomial::CDFT::~CDFT | ( | ) | [inline, virtual] |
Definition at line 218 of file dft.cc.
References mpz_clear(), and N.
void polynomial::CDFT::calc_field_and_roots_and_inverse | ( | ) | [private] |
Definition at line 427 of file dft.cc.
References polynomial::CDFT_base::calc_roots_and_inverse(), polynomial::CDFT_base::get_valid_primes_for(), polynomial::CDFT_base::M, polynomial::CDFT_base0::max_size, mpz_clear(), mpz_mul(), mpz_mul_ui(), mpz_set(), and N.
Referenced by CDFT().
int polynomial::CDFT::internal_mul | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P1, | |||
const int | k1, | |||
const TconstPolynom | P2, | |||
const int | k2, | |||
const bool | reduce_result_modN | |||
) | [protected] |
Definition at line 714 of file dft.cc.
References cerr, polynomial::CDFT_base::convolute(), cout, endl(), exit(), polynomial::CDFT_base::invpow2(), polynomial::CDFT_base::M, MARK, mpz_clear(), mpz_cmp_ui(), mpz_init2(), mpz_mod(), mpz_mul(), mpz_set(), mpz_sgn(), mpz_sizeinbase(), mpz_swap(), N, polynomial::CDFT_base::size, and polynomial::CDFT_base0::use_size().
Referenced by mul(), mulmod(), square(), and squaremod().
const mpz_t& polynomial::CDFT::get_N | ( | void | ) | const [inline] |
int polynomial::CDFT::mul | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P1, | |||
const int | k1, | |||
const TconstPolynom | P2, | |||
const int | k2 | |||
) | [inline] |
Definition at line 225 of file dft.cc.
References internal_mul().
int polynomial::CDFT::mulmod | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P1, | |||
const int | k1, | |||
const TconstPolynom | P2, | |||
const int | k2 | |||
) | [inline] |
Definition at line 232 of file dft.cc.
References internal_mul().
int polynomial::CDFT::square | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P, | |||
const int | k | |||
) | [inline] |
Definition at line 239 of file dft.cc.
References internal_mul().
int polynomial::CDFT::squaremod | ( | const TPolynom | R, | |
const int | kR, | |||
const TconstPolynom | P, | |||
const int | k | |||
) | [inline] |
Definition at line 245 of file dft.cc.
References internal_mul().
mpz_t polynomial::CDFT::N [private] |
Definition at line 191 of file dft.cc.
Referenced by calc_field_and_roots_and_inverse(), CDFT(), get_N(), internal_mul(), and ~CDFT().