com.rapidminer.tools.math
Class Complex

java.lang.Object
  extended by com.rapidminer.tools.math.Complex
All Implemented Interfaces:
java.lang.Comparable

public class Complex
extends java.lang.Object
implements java.lang.Comparable

A class for complex numbers which consists of a real and an imaginary part.

Author:
Ingo Mierswa

Constructor Summary
Complex(double real, double imaginary)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 double getImaginary()
           
 double getLength()
           
 double getMagnitude(int n)
          Normalizes the amplitude to the correct value.
 double getReal()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Complex

public Complex(double real,
               double imaginary)
Method Detail

getReal

public double getReal()

getImaginary

public double getImaginary()

getLength

public double getLength()

getMagnitude

public double getMagnitude(int n)
Normalizes the amplitude to the correct value. n must be the total used size, i.e. nyquist * 2.


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 by Rapid-I