Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@ -42,8 +42,7 @@ public class ConvolutionFFT {
* @param b The other signal.
* @return The convolved signal.
*/
public static ArrayList<FFT.Complex> convolutionFFT(
ArrayList<FFT.Complex> a, ArrayList<FFT.Complex> b) {
public static ArrayList<FFT.Complex> convolutionFFT(ArrayList<FFT.Complex> a, ArrayList<FFT.Complex> b) {
int convolvedSize = a.size() + b.size() - 1; // The size of the convolved signal
padding(a, convolvedSize); // Zero padding both signals
padding(b, convolvedSize);
@ -58,9 +57,8 @@ public class ConvolutionFFT {
convolved.add(a.get(i).multiply(b.get(i))); // FFT(a)*FFT(b)
}
FFT.fft(convolved, true); // IFFT
convolved.subList(convolvedSize, convolved.size())
.clear(); // Remove the remaining zeros after the convolvedSize. These extra zeros came
// from
convolved.subList(convolvedSize, convolved.size()).clear(); // Remove the remaining zeros after the convolvedSize. These extra zeros came
// from
// paddingPowerOfTwo() method inside the fft() method.
return convolved;