Piotr Orzech

Greenhorn

Posts: 3

posted 5 years ago

Hello,

can someone explain me this java code line by line on the selected part of the code:

Here is the whole code:

can someone explain me this java code line by line on the selected part of the code:

Here is the whole code:

Piotr Orzech

Greenhorn

Posts: 3

posted 5 years ago

I've read about fft and i found few steps how to do this. I don't know how to assign them to this code.

1.Prepare input data for summation — put them into convenient order;

2.For every summation level:

2.1For every exponent factor of the half-period:

2.2Calculate factor;

2.1.1For every sum of this factor:

2.1.2Calculate product of the factor and the second term of the sum;

2.1.3Calculate sum;

2.1.4Calculate difference.

1.Prepare input data for summation — put them into convenient order;

2.For every summation level:

2.1For every exponent factor of the half-period:

2.2Calculate factor;

2.1.1For every sum of this factor:

2.1.2Calculate product of the factor and the second term of the sum;

2.1.3Calculate sum;

2.1.4Calculate difference.

Campbell Ritchie

Sheriff

Posts: 53720

127

Piotr Orzech

Greenhorn

Posts: 3

posted 5 years ago

Do you understand the mathematics behind FFT and DIT? That is the hard part here. You need to get good grasp of this first and then to analyze code you didn't even write. Trying to understand the algorithm from a foreign code (possibly optimized using clever mathematical tricks, or - worse - even buggy) when you're a beginner in programming would certainly be a frustrating task.

Quick search for "FFT explained" gave me this.

Piotr Orzech wrote:I am begginer in programming...

Do you understand the mathematics behind FFT and DIT? That is the hard part here. You need to get good grasp of this first and then to analyze code you didn't even write. Trying to understand the algorithm from a foreign code (possibly optimized using clever mathematical tricks, or - worse - even buggy) when you're a beginner in programming would certainly be a frustrating task.

Quick search for "FFT explained" gave me this.

It is sorta covered in the JavaRanch Style Guide. |