Complex
Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct
All Implemented Interfaces: com.aspose.ms.System.IEquatable
public class Complex extends Struct<Complex> implements System.IEquatable<Complex>
Die komplexe Zahlenstruktur.
Konstruktoren
| Konstruktor | Beschreibung |
|---|---|
| Complex() | |
| Complex(double real, double imaginary) | Initialisiert eine neue Instanz der Complex Struktur. |
| Complex(Complex c) | Initialisiert eine neue Instanz der Complex Struktur. |
Felder
| Feld | Beschreibung |
|---|---|
| SIZE_OF_DOUBLE | Die Größe von double. |
| SIZE_OF_COMPLEX | Die Größe von complex. |
| ZERO | Null komplex. |
| ONE | Ein komplexer Wert mit Re(#getRe.getRe/#setRe(double).setRe(double)) und Im(#getIm.getIm/#setIm(double).setIm(double)) gleich 1. |
| I | Ein komplexer Wert mit Im(#getIm.getIm/#setIm(double).setIm(double)) gleich 1. |
Methoden
Complex()
public Complex()
Complex(double real, double imaginary)
public Complex(double real, double imaginary)
Initialisiert eine neue Instanz der Complex Struktur.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| real | double | Der Realteil. |
| imaginär | double | Der Imaginärteil. |
Complex(Complex c)
public Complex(Complex c)
Initialisiert eine neue Instanz der Complex Struktur.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| c | Complex | Die komplexe Zahl. |
SIZE_OF_DOUBLE
public static final int SIZE_OF_DOUBLE
Die Größe von double.
SIZE_OF_COMPLEX
public static final int SIZE_OF_COMPLEX
Die Größe von complex.
ZERO
public static final Complex ZERO
Null komplex.
ONE
public static final Complex ONE
Ein komplexer Wert mit Re(#getRe.getRe/#setRe(double).setRe(double)) und Im(#getIm.getIm/#setIm(double).setIm(double)) gleich 1.
I
public static final Complex I
Ein komplexer Wert mit Im(#getIm.getIm/#setIm(double).setIm(double)) gleich 1.
to_Complex(double value)
public static Complex to_Complex(double value)
Führt eine explizite Konvertierung von double zu Complex durch.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | double | Der Wert. |
Returns: Complex - The result of the conversion.
to_Complex(float value)
public static Complex to_Complex(float value)
Führt eine explizite Konvertierung von float zu Complex durch.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | float | Der Wert. |
Returns: Complex - The result of the conversion.
op_Equality(Complex a, Complex b)
public static boolean op_Equality(Complex a, Complex b)
Implementiert den Operator ==.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: boolesch - Das Ergebnis des Operators.
op_Inequality(Complex a, Complex b)
public static boolean op_Inequality(Complex a, Complex b)
Implementiert den Operator !=.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: boolesch - Das Ergebnis des Operators.
op_UnaryNegation(Complex a)
public static Complex op_UnaryNegation(Complex a)
Implementiert den Operator -.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of the operator.
op_Addition(Complex a, Complex b)
public static Complex op_Addition(Complex a, Complex b)
Implementiert den Operator +.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of the operator.
op_Addition(Complex a, double s)
public static Complex op_Addition(Complex a, double s)
Implementiert den Operator +.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of the operator.
op_Addition(double s, Complex a)
public static Complex op_Addition(double s, Complex a)
Implementiert den Operator +.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, Complex b)
public static Complex op_Subtraction(Complex a, Complex b)
Implementiert den Operator -.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, double s)
public static Complex op_Subtraction(Complex a, double s)
Implementiert den Operator -.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of the operator.
op_Subtraction(double s, Complex a)
public static Complex op_Subtraction(double s, Complex a)
Implementiert den Operator -.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, Complex b)
public static Complex op_Multiply(Complex a, Complex b)
Implementiert den Operator *.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of the operator.
op_Multiply(double s, Complex a)
public static Complex op_Multiply(double s, Complex a)
Implementiert den Operator *.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, double s)
public static Complex op_Multiply(Complex a, double s)
Implementiert den Operator *.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of the operator.
op_Division(Complex a, Complex b)
public static Complex op_Division(Complex a, Complex b)
Implementiert den Operator /.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of the operator.
op_Division(Complex a, double s)
public static Complex op_Division(Complex a, double s)
Implementiert den Operator /.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of the operator.
op_Division(double s, Complex a)
public static Complex op_Division(double s, Complex a)
Implementiert den Operator /.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of the operator.
add(Complex a, Complex b)
public static Complex add(Complex a, Complex b)
Addiert a und b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The sum complex.
add(Complex a, double s)
public static Complex add(Complex a, double s)
Addiert a und s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns:
Complex - The complex with its Re increased by s.
add(Complex a, Complex b, Complex[] result)
public static void add(Complex a, Complex b, Complex[] result)
Addiert a und b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
| result | Complex[] | Das Ergebnis. |
add(Complex a, double s, Complex[] result)
public static void add(Complex a, double s, Complex[] result)
Addiert a und s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
| result | Complex[] | Das Ergebnis. |
subtract(Complex a, Complex b)
public static Complex subtract(Complex a, Complex b)
Subtrahiert b von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of subtraction.
subtract(Complex a, double s)
public static Complex subtract(Complex a, double s)
Subtrahiert s von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of subtraction.
subtract(double s, Complex a)
public static Complex subtract(double s, Complex a)
Subtrahiert s von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of subtraction.
subtract(Complex a, Complex b, Complex[] result)
public static void subtract(Complex a, Complex b, Complex[] result)
Subtrahiert b von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
| result | Complex[] | Das Ergebnis. |
subtract(Complex a, double s, Complex[] result)
public static void subtract(Complex a, double s, Complex[] result)
Subtrahiert s von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
| result | Complex[] | Das Ergebnis. |
subtract(double s, Complex a, Complex[] result)
public static void subtract(double s, Complex a, Complex[] result)
Subtrahiert a von s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
| result | Complex[] | Das Ergebnis. |
multiply(Complex a, Complex b)
public static Complex multiply(Complex a, Complex b)
Multipliziert a mit b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of multiplication.
multiply(Complex a, double s)
public static Complex multiply(Complex a, double s)
Multipliziert a mit s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of multiplication.
multiply(Complex a, Complex b, Complex[] result)
public static void multiply(Complex a, Complex b, Complex[] result)
Multipliziert a mit b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
| result | Complex[] | Das Ergebnis. |
multiply(Complex a, double s, Complex[] result)
public static void multiply(Complex a, double s, Complex[] result)
Multipliziert a mit s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
| result | Complex[] | Das Ergebnis. |
divide(Complex a, Complex b)
public static Complex divide(Complex a, Complex b)
Dividiert a durch b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: Complex - The result of division.
divide(Complex a, double s)
public static Complex divide(Complex a, double s)
Dividiert a durch s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
Returns: Complex - The result of division.
divide(double s, Complex a)
public static Complex divide(double s, Complex a)
Dividiert a durch s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of division.
divide(Complex a, Complex b, Complex[] result)
public static void divide(Complex a, Complex b, Complex[] result)
Dividiert a durch b.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
| result | Complex[] | Das Ergebnis. |
divide(Complex a, double s, Complex[] result)
public static void divide(Complex a, double s, Complex[] result)
Dividiert a durch s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| s | double | Der s-Wert. |
| result | Complex[] | Das Ergebnis. |
divide(double s, Complex a, Complex[] result)
public static void divide(double s, Complex a, Complex[] result)
Dividiert s durch a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
| a | Complex | Der “a”-Komplex. |
| result | Complex[] | Das Ergebnis. |
negate(Complex a)
public static Complex negate(Complex a)
Negiert a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The result of negation.
approxEqual(Complex a, Complex b)
public static boolean approxEqual(Complex a, Complex b)
Prüft die ungefähre Gleichheit.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
Returns: boolean - Das Ergebnis der ungefähren Gleichheit.
approxEqual(Complex a, Complex b, double tolerance)
public static boolean approxEqual(Complex a, Complex b, double tolerance)
Prüft die ungefähre Gleichheit.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
| b | Complex | Der b-Komplex. |
| Toleranz | double | Die Toleranz. |
Returns: boolean - Das Ergebnis der ungefähren Gleichheit.
parse(String s)
public static Complex parse(String s)
Parst das angegebene s in ein Complex.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | java.lang.String | Der s-Wert. |
Returns: Complex - The complex number.
tryParse(String s, Complex[] result)
public static boolean tryParse(String s, Complex[] result)
Versucht, das angegebene s in ein Complex zu parsen.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | java.lang.String | Der s-Wert. |
| result | Complex[] | Das Ergebnis. |
Returns: boolean - True, wenn die komplexe Zahl geparst wird.
sqrt(Complex a)
public static Complex sqrt(Complex a)
Liefert die Quadratwurzel von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns: Complex - The square root.
log(Complex a)
public static Complex log(Complex a)
Liefert den Logarithmus von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns:
Complex - The log of a.
exp(Complex a)
public static Complex exp(Complex a)
Erhöht e um a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns:
Complex - e raised by a.
sin(Complex a)
public static Complex sin(Complex a)
Liefert den Sinus von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns:
Complex - Sin of a.
cos(Complex a)
public static Complex cos(Complex a)
Liefert den Kosinus von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns:
Complex - Cos of a.
tan(Complex a)
public static Complex tan(Complex a)
Liefert den Tangens von a.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| a | Complex | Der “a”-Komplex. |
Returns:
Complex - Tan of a.
isEquals(Complex obj1, Complex obj2)
public static boolean isEquals(Complex obj1, Complex obj2)
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| obj1 | Complex | |
| obj2 | Complex |
Returns: boolean
multiply_internalize(double s)
public Complex multiply_internalize(double s)
Multipliziert mit s.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| s | double | Der s-Wert. |
Returns: Complex - The result of multiplication.
getRe()
public final double getRe()
Liefert den Realteil.
Returns: double - der Realteil.
setRe(double value)
public final void setRe(double value)
Setzt den Realteil.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | double | Der Realteil. |
getIm()
public final double getIm()
Liefert den Imaginärteil.
Returns: double - der Imaginärteil.
setIm(double value)
public final void setIm(double value)
Setzt den Imaginärteil.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| Wert | double | Der Imaginärteil. |
set(double re, double im)
public final Complex set(double re, double im)
Setzt die Werte und gibt sich selbst zurück.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| re | double | Der Re-Wert. |
| im | double | Der Im-Wert. |
Returns: Complex - The object itself.
getMagnitude()
public final double getMagnitude()
Liefert den Betrag.
Wert: Der Betrag.
Returns: double - der Betrag.
getPhase()
public final double getPhase()
Liefert die Phase.
Wert: Die Phase.
Returns: double - die Phase.
getSquaredMagnitude()
public final double getSquaredMagnitude()
Liefert den quadrierten Betrag.
Wert: Der quadrierte Betrag.
Returns: double - der quadrierte Betrag.
hashCode()
public int hashCode()
Gibt einen Hashcode für diese Instanz zurück.
Returns: int – Ein Hashcode für diese Instanz, geeignet für den Einsatz in Hash‑Algorithmen und Datenstrukturen wie einer Hashtabelle.
equals(Object obj)
public boolean equals(Object obj)
Bestimmt, ob das angegebene Object gleich dieser Instanz ist.
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| obj | java.lang.Object | Das Object zum Vergleich mit dieser Instanz. |
Returns:
boolean - true wenn das angegebene Object dieser Instanz gleich ist; andernfalls false.
toString()
public String toString()
Gibt einen String zurück, der diese Instanz darstellt.
Returns: java.lang.String - Ein String, der diese Instanz darstellt.
deepClone()
public final Complex deepClone()
Klonen Sie diese Instanz.
Returns: Complex - A clone of this complex.
CloneTo(Complex that)
public void CloneTo(Complex that)
Parameters:
| Parameter | Typ | Beschreibung |
|---|---|---|
| that | Complex |
Clone()
public Complex Clone()
Returns: Complex