|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcomplex.Complex
public final class Complex
Bibliotheksklasse zum Rechnen mit komplexen Zahlen. Alle Berechnungen werden mit einem Fehler von höchstens 10-5 durchgeführt.
Constructor Summary | |
---|---|
Complex(Complex c)
Kopierkonstruktor. |
|
Complex(double real,
double imag)
Erstellt ein komplexe Zahl. |
Method Summary | |
---|---|
Complex |
add(Complex c)
Addiert die komplexe Zahl c zu der komplexen Zahl
this . |
Complex |
cube()
Kubiert die komplexe Zahl this . |
Complex |
div(Complex c)
Dividiert die komplexe Zahl this durch die komplexe Zahl
c . |
double |
imag()
Gibt den Imaginärteil zurück. |
double |
modsq()
Berechnet das Quadrat des Betrags der komplexen Zahl this . |
Complex |
mul(Complex c)
Multipliziert die komplexe Zahl this mit der komplexen Zahl
c . |
double |
real()
Gibt den Realteil zurück. |
Complex |
square()
Quadriert die komplexe Zahl this . |
Complex |
sub(Complex c)
Subtrahiert die komplexe Zahl c von der komplexen Zahl
this . |
java.lang.String |
toString()
Erstellet eine textuelle Repräsentation der komplexen Zahl this in der Form (<Realteil> +
<Imaginärteil>i). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Complex(Complex c)
c
.
c
- die zu kopierende komplexe Zahlpublic Complex(double real, double imag)
real
- der Realteilimag
- der ImaginärteilMethod Detail |
---|
public double real()
public double imag()
public Complex add(Complex c)
c
zu der komplexen Zahl
this
. Achtung! Die komplexe Zahl this
wird bei
dieser Operation verändert und als Ergebnis zurückgeliefert.
Benutzen Sie den Kopierkonstruktor, um die komplexe Zahl vor dem
Ausführen der Operation zu sichern.
c
- der Summand
public Complex sub(Complex c)
c
von der komplexen Zahl
this
. Achtung! Die komplexe Zahl this
wird bei
dieser Operation verändert und als Ergebnis zurückgeliefert.
Benutzen Sie den Kopierkonstruktor, um die komplexe Zahl vor dem
Ausführen der Operation zu sichern.
c
- der Subtrahend
public Complex mul(Complex c)
this
mit der komplexen Zahl
c
. Achtung! Die komplexe Zahl this
wird bei
dieser Operation verändert und als Ergebnis zurückgeliefert.
Benutzen Sie den Kopierkonstruktor, um die komplexe Zahl vor dem
Ausführen der Operation zu sichern.
c
- der Multiplikator
public Complex div(Complex c)
this
durch die komplexe Zahl
c
. Achtung! Die komplexe Zahl this
wird bei
dieser Operation verändert und als Ergebnis zurückgeliefert.
Benutzen Sie den Kopierkonstruktor, um die komplexe Zahl vor dem
Ausführen der Operation zu sichern.
c
- der Divisor
public Complex square()
this
. Achtung! Die komplexe Zahl
this
wird bei dieser Operation verändert und als
Ergebnis zurückgeliefert. Benutzen Sie den Kopierkonstruktor, um die
komplexe Zahl vor dem Ausführen der Operation zu sichern.
public Complex cube()
this
. Achtung! Die komplexe Zahl
this
wird bei dieser Operation verändert und als
Ergebnis zurückgeliefert. Benutzen Sie den Kopierkonstruktor, um die
komplexe Zahl vor dem Ausführen der Operation zu sichern.
public double modsq()
this
.
public java.lang.String toString()
this
in der Form (<Realteil> +
<Imaginärteil>i).
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |