File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ pub trait GroupMap<F> {
26
26
fn setup ( ) -> Self ;
27
27
fn to_group ( & self , u : F ) -> ( F , F ) ;
28
28
fn batch_to_group_x ( & self , ts : Vec < F > ) -> Vec < [ F ; 3 ] > ;
29
+ /// For debug only
30
+ fn composition ( & self ) -> Vec < F > ;
29
31
}
30
32
31
33
#[ derive( Clone , Copy ) ]
@@ -127,6 +129,25 @@ fn get_xy<G: SWModelParameters>(
127
129
}
128
130
129
131
impl < G : SWModelParameters > GroupMap < G :: BaseField > for BWParameters < G > {
132
+ /// For debug only
133
+ fn composition ( & self ) -> Vec < G :: BaseField > {
134
+ let Self {
135
+ u,
136
+ fu,
137
+ sqrt_neg_three_u_squared_minus_u_over_2,
138
+ sqrt_neg_three_u_squared,
139
+ inv_three_u_squared,
140
+ } = self ;
141
+
142
+ vec ! [
143
+ * u,
144
+ * fu,
145
+ * sqrt_neg_three_u_squared_minus_u_over_2,
146
+ * sqrt_neg_three_u_squared,
147
+ * inv_three_u_squared,
148
+ ]
149
+ }
150
+
130
151
fn setup ( ) -> Self {
131
152
assert ! ( G :: COEFF_A . is_zero( ) ) ;
132
153
You can’t perform that action at this time.
0 commit comments