Permalink
Browse files

added accessor functions for the real and complex parts of the spectrum.

  • Loading branch information...
1 parent 1c87e29 commit 09191ac0f8b03ec0082809ec979892195c3652c6 Damien Di Fede committed Apr 17, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/ddf/minim/analysis/FourierTransform.java
View
17 src/ddf/minim/analysis/FourierTransform.java
@@ -616,6 +616,23 @@ public float calcAvg(float lowFreq, float hiFreq)
avg /= (hiBound - lowBound + 1);
return avg;
}
+
+ /**
+ * Get the Real part of the Complex representation of the spectrum.
+ */
+ public float[] getSpectrumReal()
+ {
+ return real;
+ }
+
+ /**
+ * Get the Imaginary part of the Complex representation of the spectrum.
+ */
+ public float[] getSpectrumImaginary()
+ {
+ return imag;
+ }
+
/**
* Performs a forward transform on <code>buffer</code>.

0 comments on commit 09191ac

Please sign in to comment.