35 #define POLYGCD_USE_HEURISTIC 38 const int POLYGCD_HEURISTIC_MAX_DIGITS = 1000;
41 const int POLYGCD_HEURISTIC_MAX_TRIES = 10;
44 const int POLYGCD_HEURISTIC_MAX_ADD_RANDOM = 10;
47 const int POLYGCD_RAISPOWMOD_CACHE_SIZE = 1000;
53 const poly integer_content (
const poly &a);
56 const poly content_univar (
const poly &a,
int x);
57 const poly content_multivar (
const poly &a,
int x);
59 const std::vector<WORD> coefficient_list_gcd (
const std::vector<WORD> &a,
const std::vector<WORD> &b, WORD p);
62 const poly gcd_heuristic (
const poly &a,
const poly &b,
const std::vector<int> &x,
int max_tries=POLYGCD_HEURISTIC_MAX_TRIES);
64 const poly gcd_modular (
const poly &a,
const poly &b,
const std::vector<int> &x);
65 const poly gcd_modular_dense_interpolation (
const poly &a,
const poly &b,
const std::vector<int> &x,
const poly &lc,
const poly &s);
66 const poly gcd_modular_sparse_interpolation (
const poly &a,
const poly &b,
const std::vector<int> &x,
const poly &lc,
const poly &s);
68 const std::vector<int> sparse_interpolation_get_mul_list (
const poly &a,
const std::vector<int> &x,
const std::vector<int> &c);
69 void sparse_interpolation_mul_poly (
poly &a,
const std::vector<int> &m);
70 const poly sparse_interpolation_reduce_poly (
const poly &a,
const std::vector<int> &x);
71 const poly sparse_interpolation_fix_poly (
const poly &a,
int x);
74 const poly substitute_last(
const poly &a,
int x,
int c);