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>
La structure du nombre complexe.
Constructeurs
| Constructeur | Description |
|---|---|
| Complex() | |
| Complex(double real, double imaginary) | Initialise une nouvelle instance de la structure Complex struct. |
| Complex(Complex c) | Initialise une nouvelle instance de la structure Complex struct. |
Champs
| Champ | Description |
|---|---|
| SIZE_OF_DOUBLE | La taille de double. |
| SIZE_OF_COMPLEX | La taille du complexe. |
| ZERO | Complexe zéro. |
| ONE | Un complexe ayant Re(#getRe.getRe/#setRe(double).setRe(double)) et Im(#getIm.getIm/#setIm(double).setIm(double)) égaux à 1. |
| I | Un complexe ayant Im(#getIm.getIm/#setIm(double).setIm(double)) égal à 1. |
Méthodes
Complex()
public Complex()
Complex(double real, double imaginary)
public Complex(double real, double imaginary)
Initialise une nouvelle instance de la structure Complex struct.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| réel | double | La partie réelle. |
| imaginaire | double | La partie imaginaire. |
Complex(Complex c)
public Complex(Complex c)
Initialise une nouvelle instance de la structure Complex struct.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| c | Complex | Le nombre complexe. |
SIZE_OF_DOUBLE
public static final int SIZE_OF_DOUBLE
La taille de double.
SIZE_OF_COMPLEX
public static final int SIZE_OF_COMPLEX
La taille du complexe.
ZERO
public static final Complex ZERO
Complexe zéro.
ONE
public static final Complex ONE
Un complexe ayant Re(#getRe.getRe/#setRe(double).setRe(double)) et Im(#getIm.getIm/#setIm(double).setIm(double)) égaux à 1.
I
public static final Complex I
Un complexe ayant Im(#getIm.getIm/#setIm(double).setIm(double)) égal à 1.
to_Complex(double value)
public static Complex to_Complex(double value)
Effectue une conversion explicite de double vers Complex.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | double | La valeur. |
Returns: Complex - The result of the conversion.
to_Complex(float value)
public static Complex to_Complex(float value)
Effectue une conversion explicite de float vers Complex.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | float | La valeur. |
Returns: Complex - The result of the conversion.
op_Equality(Complex a, Complex b)
public static boolean op_Equality(Complex a, Complex b)
Implémente l’opérateur ==.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: booléen - Le résultat de l’opérateur.
op_Inequality(Complex a, Complex b)
public static boolean op_Inequality(Complex a, Complex b)
Implémente l’opérateur !=.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: booléen - Le résultat de l’opérateur.
op_UnaryNegation(Complex a)
public static Complex op_UnaryNegation(Complex a)
Implémente l’opérateur -.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns: Complex - The result of the operator.
op_Addition(Complex a, Complex b)
public static Complex op_Addition(Complex a, Complex b)
Implémente l’opérateur +.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of the operator.
op_Addition(Complex a, double s)
public static Complex op_Addition(Complex a, double s)
Implémente l’opérateur +.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of the operator.
op_Addition(double s, Complex a)
public static Complex op_Addition(double s, Complex a)
Implémente l’opérateur +.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, Complex b)
public static Complex op_Subtraction(Complex a, Complex b)
Implémente l’opérateur -.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of the operator.
op_Subtraction(Complex a, double s)
public static Complex op_Subtraction(Complex a, double s)
Implémente l’opérateur -.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of the operator.
op_Subtraction(double s, Complex a)
public static Complex op_Subtraction(double s, Complex a)
Implémente l’opérateur -.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, Complex b)
public static Complex op_Multiply(Complex a, Complex b)
Implémente l’opérateur *.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of the operator.
op_Multiply(double s, Complex a)
public static Complex op_Multiply(double s, Complex a)
Implémente l’opérateur *.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of the operator.
op_Multiply(Complex a, double s)
public static Complex op_Multiply(Complex a, double s)
Implémente l’opérateur *.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of the operator.
op_Division(Complex a, Complex b)
public static Complex op_Division(Complex a, Complex b)
Implémente l’opérateur /.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of the operator.
op_Division(Complex a, double s)
public static Complex op_Division(Complex a, double s)
Implémente l’opérateur /.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of the operator.
op_Division(double s, Complex a)
public static Complex op_Division(double s, Complex a)
Implémente l’opérateur /.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of the operator.
add(Complex a, Complex b)
public static Complex add(Complex a, Complex b)
Ajoute a et b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The sum complex.
add(Complex a, double s)
public static Complex add(Complex a, double s)
Ajoute a et s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
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)
Ajoute a et b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
| result | Complex[] | Le résultat. |
add(Complex a, double s, Complex[] result)
public static void add(Complex a, double s, Complex[] result)
Ajoute a et s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
| result | Complex[] | Le résultat. |
subtract(Complex a, Complex b)
public static Complex subtract(Complex a, Complex b)
Soustrait b de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of subtraction.
subtract(Complex a, double s)
public static Complex subtract(Complex a, double s)
Soustrait s de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of subtraction.
subtract(double s, Complex a)
public static Complex subtract(double s, Complex a)
Soustrait s de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of subtraction.
subtract(Complex a, Complex b, Complex[] result)
public static void subtract(Complex a, Complex b, Complex[] result)
Soustrait b de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
| result | Complex[] | Le résultat. |
subtract(Complex a, double s, Complex[] result)
public static void subtract(Complex a, double s, Complex[] result)
Soustrait s de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
| result | Complex[] | Le résultat. |
subtract(double s, Complex a, Complex[] result)
public static void subtract(double s, Complex a, Complex[] result)
Soustrait a de s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
| result | Complex[] | Le résultat. |
multiply(Complex a, Complex b)
public static Complex multiply(Complex a, Complex b)
Multiplie a par b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of multiplication.
multiply(Complex a, double s)
public static Complex multiply(Complex a, double s)
Multiplie a par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of multiplication.
multiply(Complex a, Complex b, Complex[] result)
public static void multiply(Complex a, Complex b, Complex[] result)
Multiplie a par b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
| result | Complex[] | Le résultat. |
multiply(Complex a, double s, Complex[] result)
public static void multiply(Complex a, double s, Complex[] result)
Multiplie a par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
| result | Complex[] | Le résultat. |
divide(Complex a, Complex b)
public static Complex divide(Complex a, Complex b)
Divise a par b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: Complex - The result of division.
divide(Complex a, double s)
public static Complex divide(Complex a, double s)
Divise a par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
Returns: Complex - The result of division.
divide(double s, Complex a)
public static Complex divide(double s, Complex a)
Divise a par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
Returns: Complex - The result of division.
divide(Complex a, Complex b, Complex[] result)
public static void divide(Complex a, Complex b, Complex[] result)
Divise a par b.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
| result | Complex[] | Le résultat. |
divide(Complex a, double s, Complex[] result)
public static void divide(Complex a, double s, Complex[] result)
Divise a par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| s | double | La valeur s. |
| result | Complex[] | Le résultat. |
divide(double s, Complex a, Complex[] result)
public static void divide(double s, Complex a, Complex[] result)
Divise s par a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
| a | Complex | Le complexe "a". |
| result | Complex[] | Le résultat. |
negate(Complex a)
public static Complex negate(Complex a)
Négatif a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns: Complex - The result of negation.
approxEqual(Complex a, Complex b)
public static boolean approxEqual(Complex a, Complex b)
Vérifie l’égalité approximative.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
Returns: booléen - Le résultat d’égalité approximative.
approxEqual(Complex a, Complex b, double tolerance)
public static boolean approxEqual(Complex a, Complex b, double tolerance)
Vérifie l’égalité approximative.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
| b | Complex | Le complexe b. |
| tolérance | double | La tolérance. |
Returns: booléen - Le résultat d’égalité approximative.
parse(String s)
public static Complex parse(String s)
Analyse la s spécifiée en un Complex.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | java.lang.String | La valeur s. |
Returns: Complex - The complex number.
tryParse(String s, Complex[] result)
public static boolean tryParse(String s, Complex[] result)
Essaie d’analyser la s spécifiée en un Complex.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | java.lang.String | La valeur s. |
| result | Complex[] | Le résultat. |
Returns: booléen - Vrai, si le nombre complexe est analysé.
sqrt(Complex a)
public static Complex sqrt(Complex a)
Obtient la racine carrée de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns: Complex - The square root.
log(Complex a)
public static Complex log(Complex a)
Obtient le logarithme de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns:
Complex - The log of a.
exp(Complex a)
public static Complex exp(Complex a)
Élève e à la puissance a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns:
Complex - e raised by a.
sin(Complex a)
public static Complex sin(Complex a)
Obtient le sinus de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns:
Complex - Sin of a.
cos(Complex a)
public static Complex cos(Complex a)
Obtient le cosinus de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns:
Complex - Cos of a.
tan(Complex a)
public static Complex tan(Complex a)
Obtient la tangente de a.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| a | Complex | Le complexe "a". |
Returns:
Complex - Tan of a.
isEquals(Complex obj1, Complex obj2)
public static boolean isEquals(Complex obj1, Complex obj2)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| obj1 | Complex | |
| obj2 | Complex |
Returns: boolean
multiply_internalize(double s)
public Complex multiply_internalize(double s)
Multiplie par s.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| s | double | La valeur s. |
Returns: Complex - The result of multiplication.
getRe()
public final double getRe()
Obtient la partie réelle.
Returns: double - la partie réelle.
setRe(double value)
public final void setRe(double value)
Définit la partie réelle.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | double | la partie réelle. |
getIm()
public final double getIm()
Obtient la partie imaginaire.
Returns: double - la partie imaginaire.
setIm(double value)
public final void setIm(double value)
Définit la partie imaginaire.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | double | la partie imaginaire. |
set(double re, double im)
public final Complex set(double re, double im)
Définit les valeurs et renvoie lui-même.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| re | double | La valeur Re. |
| im | double | La valeur Im. |
Returns: Complex - The object itself.
getMagnitude()
public final double getMagnitude()
Obtient le module.
Valeur : La magnitude.
Returns: double - la magnitude.
getPhase()
public final double getPhase()
Obtient la phase.
Valeur : La phase.
Returns: double - la phase.
getSquaredMagnitude()
public final double getSquaredMagnitude()
Obtient le module au carré.
Valeur : La magnitude au carré.
Returns: double - la magnitude au carré.
hashCode()
public int hashCode()
Renvoie un code de hachage pour cette instance.
Returns: int - Un code de hachage pour cette instance, adapté à une utilisation dans les algorithmes de hachage et les structures de données comme une table de hachage.
equals(Object obj)
public boolean equals(Object obj)
Détermine si l’Object spécifié est égal à cette instance.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| obj | java.lang.Object | L’Object à comparer avec cette instance. |
Returns:
booléen - true si l’Object spécifié est égal à cette instance ; sinon, false.
toString()
public String toString()
Renvoie une chaîne qui représente cette instance.
Returns: java.lang.String - Une chaîne qui représente cette instance.
deepClone()
public final Complex deepClone()
Clone cette instance.
Returns: Complex - A clone of this complex.
CloneTo(Complex that)
public void CloneTo(Complex that)
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| that | Complex |
Clone()
public Complex Clone()
Returns: Complex