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>
Den komplexa talstrukturen.
Konstruktörer
| Konstruktor | Beskrivning |
|---|---|
| Complex() | |
| Complex(double real, double imaginary) | Initierar en ny instans av strukturen Complex struct. |
| Complex(Complex c) | Initierar en ny instans av strukturen Complex struct. |
Fält
| Fält | Beskrivning |
|---|---|
| SIZE_OF_DOUBLE | Storleken på double. |
| SIZE_OF_COMPLEX | Storleken på komplex. |
| ZERO | Noll komplex. |
| ONE | Ett komplex med Re(#getRe.getRe/#setRe(double).setRe(double)) och Im(#getIm.getIm/#setIm(double).setIm(double)) lika med 1. |
| I | Ett komplex med Im(#getIm.getIm/#setIm(double).setIm(double)) lika med 1. |
Metoder
Complex()
public Complex()
Complex(double real, double imaginary)
public Complex(double real, double imaginary)
Initierar en ny instans av strukturen Complex struct.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| reell | double | Den reella delen. |
| imaginär | double | Den imaginära delen. |
Complex(Complex c)
public Complex(Complex c)
Initierar en ny instans av strukturen Complex struct.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| c | Complex | Det komplexa talet. |
SIZE_OF_DOUBLE
public static final int SIZE_OF_DOUBLE
Storleken på double.
SIZE_OF_COMPLEX
public static final int SIZE_OF_COMPLEX
Storleken på komplex.
ZERO
public static final Complex ZERO
Noll komplex.
ONE
public static final Complex ONE
Ett komplex med Re(#getRe.getRe/#setRe(double).setRe(double)) och Im(#getIm.getIm/#setIm(double).setIm(double)) lika med 1.
I
public static final Complex I
Ett komplex med Im(#getIm.getIm/#setIm(double).setIm(double)) lika med 1.
to_Complex(double value)
public static Complex to_Complex(double value)
Utför en explicit konvertering från double till Complex.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | double | Värdet. |
Returns: Complex - The result of the conversion.
to_Complex(float value)
public static Complex to_Complex(float value)
Utför en explicit konvertering från float till Complex.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | float | Värdet. |
Returns: Complex - The result of the conversion.
op_Equality(Complex a, Complex b)
public static boolean op_Equality(Complex a, Complex b)
Implementerar operatorn ==.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: boolean - Resultatet av operatorn.
op_Inequality(Complex a, Complex b)
public static boolean op_Inequality(Complex a, Complex b)
Implementerar operatorn !=.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: boolean - Resultatet av operatorn.
op_UnaryNegation(Complex a)
public static Complex op_UnaryNegation(Complex a)
Implementerar operatorn -.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of the operator.
op_Addition(Complex a, Complex b)
public static Complex op_Addition(Complex a, Complex b)
Implementerar operatorn +.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of the operator.
op_Addition(Complex a, double s)
public static Complex op_Addition(Complex a, double s)
Implementerar operatorn +.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of the operator.
op_Addition(double s, Complex a)
public static Complex op_Addition(double s, Complex a)
Implementerar operatorn +.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, Complex b)
public static Complex op_Subtraction(Complex a, Complex b)
Implementerar operatorn -.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, double s)
public static Complex op_Subtraction(Complex a, double s)
Implementerar operatorn -.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of the operator.
op_Subtraction(double s, Complex a)
public static Complex op_Subtraction(double s, Complex a)
Implementerar operatorn -.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, Complex b)
public static Complex op_Multiply(Complex a, Complex b)
Implementerar operatorn *.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of the operator.
op_Multiply(double s, Complex a)
public static Complex op_Multiply(double s, Complex a)
Implementerar operatorn *.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, double s)
public static Complex op_Multiply(Complex a, double s)
Implementerar operatorn *.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of the operator.
op_Division(Complex a, Complex b)
public static Complex op_Division(Complex a, Complex b)
Implementerar operatorn /.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of the operator.
op_Division(Complex a, double s)
public static Complex op_Division(Complex a, double s)
Implementerar operatorn /.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of the operator.
op_Division(double s, Complex a)
public static Complex op_Division(double s, Complex a)
Implementerar operatorn /.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of the operator.
add(Complex a, Complex b)
public static Complex add(Complex a, Complex b)
Adderar a och b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The sum complex.
add(Complex a, double s)
public static Complex add(Complex a, double s)
Adderar a och s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
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)
Adderar a och b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
| result | Complex[] | Resultatet. |
add(Complex a, double s, Complex[] result)
public static void add(Complex a, double s, Complex[] result)
Adderar a och s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
| result | Complex[] | Resultatet. |
subtract(Complex a, Complex b)
public static Complex subtract(Complex a, Complex b)
Subtraherar b från a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of subtraction.
subtract(Complex a, double s)
public static Complex subtract(Complex a, double s)
Subtraherar s från a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of subtraction.
subtract(double s, Complex a)
public static Complex subtract(double s, Complex a)
Subtraherar s från a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of subtraction.
subtract(Complex a, Complex b, Complex[] result)
public static void subtract(Complex a, Complex b, Complex[] result)
Subtraherar b från a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
| result | Complex[] | Resultatet. |
subtract(Complex a, double s, Complex[] result)
public static void subtract(Complex a, double s, Complex[] result)
Subtraherar s från a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
| result | Complex[] | Resultatet. |
subtract(double s, Complex a, Complex[] result)
public static void subtract(double s, Complex a, Complex[] result)
Subtraherar a från s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
| result | Complex[] | Resultatet. |
multiply(Complex a, Complex b)
public static Complex multiply(Complex a, Complex b)
Multiplicerar a med b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of multiplication.
multiply(Complex a, double s)
public static Complex multiply(Complex a, double s)
Multiplicerar a med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of multiplication.
multiply(Complex a, Complex b, Complex[] result)
public static void multiply(Complex a, Complex b, Complex[] result)
Multiplicerar a med b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
| result | Complex[] | Resultatet. |
multiply(Complex a, double s, Complex[] result)
public static void multiply(Complex a, double s, Complex[] result)
Multiplicerar a med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
| result | Complex[] | Resultatet. |
divide(Complex a, Complex b)
public static Complex divide(Complex a, Complex b)
Dividerar a med b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: Complex - The result of division.
divide(Complex a, double s)
public static Complex divide(Complex a, double s)
Dividerar a med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
Returns: Complex - The result of division.
divide(double s, Complex a)
public static Complex divide(double s, Complex a)
Dividerar a med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of division.
divide(Complex a, Complex b, Complex[] result)
public static void divide(Complex a, Complex b, Complex[] result)
Dividerar a med b.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
| result | Complex[] | Resultatet. |
divide(Complex a, double s, Complex[] result)
public static void divide(Complex a, double s, Complex[] result)
Dividerar a med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| s | double | Det s-värdet. |
| result | Complex[] | Resultatet. |
divide(double s, Complex a, Complex[] result)
public static void divide(double s, Complex a, Complex[] result)
Dividerar s med a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
| a | Complex | Den “a” komplexen. |
| result | Complex[] | Resultatet. |
negate(Complex a)
public static Complex negate(Complex a)
Negerar a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns: Complex - The result of negation.
approxEqual(Complex a, Complex b)
public static boolean approxEqual(Complex a, Complex b)
Kontrollerar ungefärlig likhet.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
Returns: boolean - Det approximativa likhetsresultatet.
approxEqual(Complex a, Complex b, double tolerance)
public static boolean approxEqual(Complex a, Complex b, double tolerance)
Kontrollerar ungefärlig likhet.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
| b | Complex | Den b komplexen. |
| tolerans | double | Toleransen. |
Returns: boolean - Det approximativa likhetsresultatet.
parse(String s)
public static Complex parse(String s)
Analyserar den angivna s till en Complex.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | java.lang.String | Det s-värdet. |
Returns: Complex - The complex number.
tryParse(String s, Complex[] result)
public static boolean tryParse(String s, Complex[] result)
Försöker analysera den angivna s till en Complex.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | java.lang.String | Det s-värdet. |
| result | Complex[] | Resultatet. |
Returns: boolean - Sant, om det komplexa talet har parsats.
sqrt(Complex a)
public static Complex sqrt(Complex a)
Hämtar kvadratroten av a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns: Complex - The square root.
log(Complex a)
public static Complex log(Complex a)
Hämtar logaritmen av a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns:
Complex - The log of a.
exp(Complex a)
public static Complex exp(Complex a)
Höjer e till a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns:
Complex - e raised by a.
sin(Complex a)
public static Complex sin(Complex a)
Hämtar Sin av a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns:
Complex - Sin of a.
cos(Complex a)
public static Complex cos(Complex a)
Hämtar Cos av a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns:
Complex - Cos of a.
tan(Complex a)
public static Complex tan(Complex a)
Hämtar Tan av a.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| a | Complex | Den “a” komplexen. |
Returns:
Complex - Tan of a.
isEquals(Complex obj1, Complex obj2)
public static boolean isEquals(Complex obj1, Complex obj2)
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| obj1 | Complex | |
| obj2 | Complex |
Returns: boolean
multiply_internalize(double s)
public Complex multiply_internalize(double s)
Multiplicerar med s.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| s | double | Det s-värdet. |
Returns: Complex - The result of multiplication.
getRe()
public final double getRe()
Hämtar den reella delen.
Returns: double - den reella delen.
setRe(double value)
public final void setRe(double value)
Sätter den reella delen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | double | den reella delen. |
getIm()
public final double getIm()
Hämtar den imaginära delen.
Returns: double - den imaginära delen.
setIm(double value)
public final void setIm(double value)
Sätter den imaginära delen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| värde | double | den imaginära delen. |
set(double re, double im)
public final Complex set(double re, double im)
Sätter värdena och returnerar sig själv.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| re | double | Det Re-värdet. |
| im | double | Det Im-värdet. |
Returns: Complex - The object itself.
getMagnitude()
public final double getMagnitude()
Hämtar magnituden.
Värde: magnituden.
Returns: double - magnituden.
getPhase()
public final double getPhase()
Hämtar fasen.
Värde: fasen.
Returns: double - fasen.
getSquaredMagnitude()
public final double getSquaredMagnitude()
Hämtar den kvadrerade magnituden.
Värde: den kvadrerade magnituden.
Returns: double - den kvadrerade magnituden.
hashCode()
public int hashCode()
Returnerar en hashkod för detta objekt.
Returns: int - En hashkod för denna instans, lämplig för användning i hash-algoritmer och datastrukturer som en hash‑tabell.
equals(Object obj)
public boolean equals(Object obj)
Bestämmer om det specificerade Object är lika med den här instansen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| obj | java.lang.Object | Det Object att jämföra med den här instansen. |
Returns:
boolean - true om det angivna Object är lika med den här instansen; annars false.
toString()
public String toString()
Returnerar en String som representerar detta objekt.
Returns: java.lang.String - En sträng som representerar detta objekt.
deepClone()
public final Complex deepClone()
Klonar den här instansen.
Returns: Complex - A clone of this complex.
CloneTo(Complex that)
public void CloneTo(Complex that)
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| that | Complex |
Clone()
public Complex Clone()
Returns: Complex