fn index_calculus_for_primitive_root(
p: u64,
ord: u64,
br_primes: &[BarrettReduction<u64>],
prec: &QdrtPowPrec,
) -> Vec<u64>Examples found in repository?
crates/competitive/src/math/discrete_logarithm.rs (line 265)
260 fn new(p: u64, br_primes: &[BarrettReduction<u64>]) -> Self {
261 let ord = p - 1;
262 let g = primitive_root(p);
263 let br = BarrettReduction::<u128>::new(p as u128);
264 let prec = QdrtPowPrec::new(g, ord, &br);
265 let coeff = index_calculus_for_primitive_root(p, ord, br_primes, &prec);
266 Self {
267 p,
268 ord,
269 prec,
270 coeff,
271 }
272 }