public void TransformBackwardInPlace() { int size = 4096; var pffft = new PFFFT(size, Transform.Real); var data = new float[size]; pffft.Backward(data); }
public void TransformBackward() { int size = 4096; var pffft = new PFFFT(size, Transform.Real); var dataIn = new float[size]; var dataOut = new float[size]; pffft.Backward(dataIn, dataOut); }
public void TransformForwardAndBackward() { int size = 4096; var pffft = new PFFFT(size, Transform.Real); var dataIn = new float[size]; var dataOut = new float[size]; var dataBack = new float[size]; var generator = new SineGeneratorStream(4096, 100, TimeSpan.FromSeconds(1)); generator.Read(dataIn, 0, size); pffft.Forward(dataIn, dataOut); pffft.Backward(dataOut, dataBack); CollectionAssert.AreEqual(dataIn, dataBack, new FFTComparer()); }