@@ -141,7 +141,7 @@ impl Domain {
141
141
points
142
142
}
143
143
144
- /// Computes a DFT for the group elements(elliptic curve points) using the roots in the domain.
144
+ /// Computes a FFT for the group elements(elliptic curve points) using the roots in the domain.
145
145
///
146
146
/// Note: Thinking about an FFT as multiple inner products between powers of the elements
147
147
/// in the domain and the input polynomial makes this easier to visualize.
@@ -155,12 +155,12 @@ impl Domain {
155
155
points
156
156
}
157
157
158
- /// Computes an IDFT for the group elements(elliptic curve points) using the roots in the domain.
158
+ /// Computes an IFFT for the group elements(elliptic curve points) using the roots in the domain.
159
159
pub fn ifft_g1 ( & self , points : Vec < G1Projective > ) -> Vec < G1Projective > {
160
160
self . ifft_g1_take_n ( points, None )
161
161
}
162
162
163
- /// Computes an IDFT for the group elements(elliptic curve points) using the roots in the domain.
163
+ /// Computes an IFFT for the group elements(elliptic curve points) using the roots in the domain.
164
164
///
165
165
/// `n`: indicates how many points we would like to return. Passing `None` will return be equivalent
166
166
/// to compute an ifft_g1 and returning as many elements as there are in the domain.
@@ -223,7 +223,7 @@ impl Domain {
223
223
}
224
224
}
225
225
226
- /// Computes a DFT of the field elements(scalars).
226
+ /// Computes a FFT of the field elements(scalars).
227
227
///
228
228
/// Note: This is essentially multiple inner products.
229
229
///
@@ -268,7 +268,7 @@ fn fft_scalar_inplace(twiddle_factors: &[Scalar], a: &mut [Scalar]) {
268
268
}
269
269
}
270
270
271
- /// Computes a DFT of the group elements(points).
271
+ /// Computes a FFT of the group elements(points).
272
272
///
273
273
/// Note: This is essentially multiple multi-scalar multiplications.
274
274
fn fft_g1_inplace ( twiddle_factors : & [ Scalar ] , a : & mut [ G1Projective ] ) {
@@ -403,15 +403,15 @@ mod tests {
403
403
. map ( |_| G1Projective :: random ( & mut rand:: thread_rng ( ) ) )
404
404
. collect ( ) ;
405
405
406
- let dft_points = domain. fft_g1 ( points. clone ( ) ) ;
406
+ let fft_points = domain. fft_g1 ( points. clone ( ) ) ;
407
407
for ( i, root) in domain. roots . iter ( ) . enumerate ( ) {
408
408
let powers = powers_of ( root, points. len ( ) ) ;
409
409
410
410
let expected = naive_msm ( & points, & powers) ;
411
- let got = dft_points [ i] ;
411
+ let got = fft_points [ i] ;
412
412
assert_eq ! ( expected, got) ;
413
413
}
414
414
415
- assert_eq ! ( domain. ifft_g1( dft_points ) , points) ;
415
+ assert_eq ! ( domain. ifft_g1( fft_points ) , points) ;
416
416
}
417
417
}
0 commit comments