math.complex
Class ComplexFloat1d

java.lang.Object
  extended by math.complex.ComplexFloat1d

public class ComplexFloat1d
extends java.lang.Object

User: lyon Date: Nov 13, 2005 Time: 8:00:08 AM Copyright DocJava, Inc. 2005.


Field Summary
 float[] im
           
 float[] re
           
 
Constructor Summary
ComplexFloat1d()
           
ComplexFloat1d(float[] realPart, float[] imaginaryPart)
           
ComplexFloat1d(int n)
           
ComplexFloat1d(short[][] s)
          Copy the s input into the real number plane and set the imaginary plane to zero.
 
Method Summary
 void center()
           
 void conjugate()
           
 ComplexFloat1d getCopy()
           
 float[] getIm()
           
 float getIm(int i)
           
 int getLength()
           
 float getMaxReal()
          Search the real part of the complex array
 float getMinReal()
          Search the real part of the complex array
 float[] getPSD()
           
static float[] getPSD(float[] in_r, float[] in_i)
          Compute the power spectral density of the input arrays
 float[] getRe()
           
 float getRe(int i)
           
 short[][] getRealAs2dShort(int w, int h)
           
 float getRealSum()
           
 float[] logScaleMagnitude(float magScale)
           
static void main(java.lang.String[] args)
           
 void minus(ComplexFloat1d b)
           
 void mult(ComplexFloat1d b)
           
 void normalize()
           
 void plus(ComplexFloat1d b)
           
 void print()
           
 void removeDcComponent()
           
 void scale(float sc)
           
 void scaleAndMask(short[][] r)
          Mask the image kernal with the real and imaginary numbers.
 void scaleIntoRange(float min, float max, int maxValueOuput)
           
 void setIm(float[] im)
           
 void setRe(float[] re)
           
 void setRe(short[] re)
           
 void swap(int i, int j)
           
 void swapInt(int i, int j)
           
 void thresh(int thresh)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

re

public float[] re

im

public float[] im
Constructor Detail

ComplexFloat1d

public ComplexFloat1d()

ComplexFloat1d

public ComplexFloat1d(short[][] s)
Copy the s input into the real number plane and set the imaginary plane to zero.

Parameters:
s -

ComplexFloat1d

public ComplexFloat1d(int n)

ComplexFloat1d

public ComplexFloat1d(float[] realPart,
                      float[] imaginaryPart)
Method Detail

getRealAs2dShort

public short[][] getRealAs2dShort(int w,
                                  int h)

main

public static void main(java.lang.String[] args)

swapInt

public void swapInt(int i,
                    int j)

plus

public void plus(ComplexFloat1d b)

getCopy

public ComplexFloat1d getCopy()

scaleAndMask

public void scaleAndMask(short[][] r)
Mask the image kernal with the real and imaginary numbers. Assume the image kernal ranges from 0..255. Make it a unitary filter by dividing by 255.

Parameters:
r -

scale

public void scale(float sc)

mult

public void mult(ComplexFloat1d b)

minus

public void minus(ComplexFloat1d b)

logScaleMagnitude

public float[] logScaleMagnitude(float magScale)

getIm

public float[] getIm()

getIm

public float getIm(int i)

setIm

public void setIm(float[] im)

getRe

public float getRe(int i)

getRe

public float[] getRe()

getLength

public int getLength()

setRe

public void setRe(float[] re)

swap

public void swap(int i,
                 int j)

getPSD

public float[] getPSD()

getPSD

public static float[] getPSD(float[] in_r,
                             float[] in_i)
Compute the power spectral density of the input arrays

Parameters:
in_r - real part of an fft
in_i - imaginary part of an fft
Returns:
the psd.

center

public void center()

setRe

public void setRe(short[] re)

print

public void print()

normalize

public void normalize()

getMaxReal

public float getMaxReal()
Search the real part of the complex array

Returns:
the max value

getMinReal

public float getMinReal()
Search the real part of the complex array

Returns:
the min value

getRealSum

public float getRealSum()

conjugate

public void conjugate()

removeDcComponent

public void removeDcComponent()

scaleIntoRange

public void scaleIntoRange(float min,
                           float max,
                           int maxValueOuput)

thresh

public void thresh(int thresh)