com.rapidminer.tools.math
Class Complex
java.lang.Object
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)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Complex
public Complex(double real,
double imaginary)
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