UniVista.support
Class Complex

java.lang.Object
  |
  +--UniVista.support.Complex
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Complex
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

a simple wrapper class for containing complex numbers in floating point

See Also:
Serialized Form

Field Summary
 float im
          the imaginary component
 float re
          the real component
 
Constructor Summary
Complex()
           
Complex(Complex c)
           
Complex(float re, float im)
           
Complex(java.lang.String s)
          Construct a complex from a String of the form "(re, im)" .
Complex(java.lang.String re, java.lang.String im)
           
 
Method Summary
 java.lang.Object clone()
          clone
 void duplicate(Complex c)
          duplicate a Complex into this object
 boolean equals(java.lang.Object obj)
          compare two Complex objects for equality
 java.lang.String toString()
          convert to string
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

re

public float re
the real component

im

public float im
the imaginary component
Constructor Detail

Complex

public Complex()

Complex

public Complex(float re,
               float im)

Complex

public Complex(java.lang.String s)
Construct a complex from a String of the form "(re, im)" .

Complex

public Complex(java.lang.String re,
               java.lang.String im)

Complex

public Complex(Complex c)
Method Detail

clone

public java.lang.Object clone()
clone
Overrides:
clone in class java.lang.Object

duplicate

public void duplicate(Complex c)
duplicate a Complex into this object

equals

public boolean equals(java.lang.Object obj)
compare two Complex objects for equality
Overrides:
equals in class java.lang.Object

toString

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