1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! This module contains implementations for different mathematical groups, each of which satisfies
//! our `UnknownOrderGroup` trait. They can be used with the accumulator and vector commitment
//! structures, or standalone if you have a custom application.
//!
use Integer;
use Debug;
use Hash;
use Sized;
pub use ClassElem;
use ClassCtx;
pub use create_discriminant;
pub use CLASS_GROUP_DISCRIMINANT;
pub use ClassGroup;
// pub fn multi_exp<G: Group>(alphas: &[G::Elem], x: &[Integer]) -> G::Elem {
// if alphas.len() == 1 {
// return alphas[0].clone();
// }
// let n_half = alphas.len() / 2;
// let alpha_l = &alphas[..n_half];
// let alpha_r = &alphas[n_half..];
// let x_l = &x[..n_half];
// let x_r = &x[n_half..];
// let x_star_l = x_l.iter().product();
// let x_star_r = x_r.iter().product();
// let l = multi_exp::<G>(alpha_l, x_l);
// let r = multi_exp::<G>(alpha_r, x_r);
// G::op(&G::exp(&l, &x_star_r), &G::exp(&r, &x_star_l))
// }