IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Represents a complex number. More...
Public Member Functions | |
Complex (double re, double im) | |
Initializes a new complex number. More... | |
override string | ToString () |
Produces a string representation of the complex number. More... | |
override bool | Equals (object obj) |
Determines whether the given object represents the same complex number. More... | |
bool | Equals (Complex other) |
Determines whether the given complex number is the same. More... | |
override int | GetHashCode () |
Returns a hash code for the complex number. More... | |
Static Public Member Functions | |
static | operator double (Complex z) |
Converts the complex number to a double-precision real number. More... | |
static implicit | operator Complex (double x) |
Converts a double-precision real number to a complex number. More... | |
static Complex | operator- (Complex z) |
Negates a complex number. More... | |
static bool | operator== (Complex z1, Complex z2) |
Tests the equality of two complex numbers. More... | |
static bool | operator!= (Complex z1, Complex z2) |
Tests the inequality of two complex numbers. More... | |
static Complex | operator+ (Complex z1, Complex z2) |
Adds two complex numbers. More... | |
static Complex | operator- (Complex z1, Complex z2) |
Subtracts the second complex number from the first. More... | |
static Complex | operator* (Complex z1, Complex z2) |
Multiplies two complex numbers. More... | |
static Complex | operator/ (Complex z1, Complex z2) |
Divides two complex numbers. More... | |
static Complex | operator* (double a, Complex z) |
Multiplies a complex number by a real number. More... | |
static Complex | operator* (Complex z, double a) |
Multiplies a real number by a complex number. More... | |
Static Public Attributes | |
static readonly Complex | Zero = new Complex(0.0, 0.0) |
Gets the complex value of zero. More... | |
static readonly Complex | One = new Complex(1.0, 0.0) |
Gets the complex value of one. More... | |
static readonly Complex | I = new Complex(0.0, 1.0) |
Gets the square root of negative one. More... | |
Properties | |
double | Re [get] |
Gets the real part of the complex number. More... | |
double | Im [get] |
Gets the imaginary part of the complex number. More... | |
Complex | Conjugate [get] |
Gets the complex conjugate of the complex number. More... | |
Private Attributes | |
double | re |
double | im |
Represents a complex number.
Version 4.0 of the .NET Framework introduced a Complex structure equivalent to this one. To maintain compatibility with earlier versions of the .NET Framework, Meta.Numerics maintains its own Complex structure.
|
inline |
Initializes a new complex number.
re | The real part of the complex number. |
im | The imaginary part of the complex number. |
|
inlineexplicitstatic |
Converts the complex number to a double-precision real number.
z | The complex number to covert. |
This explicit cast will fail if the complex number has a non-zero imaginary part. If you just want to obtain the real part of a complex number, use the Re property.
InvalidCastException | z.Im ≠ 0 |
References Meta.Numerics.Complex.Im, and Meta.Numerics.Complex.Re.
|
inlinestatic |
Converts a double-precision real number to a complex number.
x | The double-precision real number to convert. |
The complex number output has a zero imaginary part and real part equal to the input number.
This is an implicit cast; the compiler will apply it automatically whenever a real number is given in a situation where a complex number is required.
|
inline |
Produces a string representation of the complex number.
Negates a complex number.
z | The argument. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Tests the equality of two complex numbers.
z1 | The first complex number. |
z2 | The second complex number. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Tests the inequality of two complex numbers.
z1 | The first complex number. |
z2 | The second complex number. |
|
inline |
Determines whether the given object represents the same complex number.
obj | The object to compare. |
Referenced by Test.ComplexTest.ComplexEquality(), and Test.ComplexTest.ComplexEquals().
|
inline |
Determines whether the given complex number is the same.
other | The complex number to compare. |
|
inline |
Returns a hash code for the complex number.
Referenced by Test.ComplexTest.ComplexEquality().
Adds two complex numbers.
z1 | The first complex number. |
z2 | The second complex number. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Subtracts the second complex number from the first.
z1 | The first complex number. |
z2 | The second complex number. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Multiplies two complex numbers.
z1 | The first complex number. |
z2 | The second complex number. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Divides two complex numbers.
z1 | The first complex number. |
z2 | The second complex number. |
References Meta.Numerics.Complex.Im, and Meta.Numerics.Complex.Re.
Multiplies a complex number by a real number.
a | The real number. |
z | The complex number. |
References Meta.Numerics.Complex.im, and Meta.Numerics.Complex.re.
Multiplies a real number by a complex number.
z | The complex number. |
a | The real number. |
|
private |
|
private |
Gets the complex value of zero.
Referenced by Meta.Numerics.ComplexMath.Pow().
Gets the complex value of one.
Referenced by Test.AdvancedComplexMathTest.ComplexReimannZetaPrimesTest(), Meta.Numerics.ComplexMath.Pow(), Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta(), and Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta_EulerMaclaurin().
Gets the square root of negative one.
Referenced by Test.ComplexMathTest.ComplexIDefinition(), and Test.ComplexMathTest.ComplexIParts().
|
get |
Gets the real part of the complex number.
Referenced by Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.ComplexMath.Arg(), Meta.Numerics.Functions.AdvancedMath.Bessel_Steed(), Test.BugTests.Bug7208(), Test.ComplexTest.ComplexComponents(), Test.ComplexTest.ComplexConjugation(), Test.AdvancedComplexMathTest.ComplexDiLogBranchCut(), Test.AdvancedComplexMathTest.ComplexDiLogClausen(), Test.AdvancedComplexMathTest.ComplexErfFaddevaAgreement(), Test.AdvancedComplexMathTest.ComplexErfFresnel(), Test.ComplexTest.ComplexExplicitCast(), Test.ComplexMathTest.ComplexExpSumTest(), Test.AdvancedComplexMathTest.ComplexFaddeevaDawson(), Test.AdvancedComplexMathTest.ComplexGammaInequality(), Test.ComplexMathTest.ComplexIParts(), Test.AdvancedComplexMathTest.ComplexLogGammaConjugation(), Test.AdvancedComplexMathTest.ComplexReimannZetaPrimesTest(), Test.AdvancedComplexMathTest.ComplexRiemannZetaZeros(), Meta.Numerics.ComplexMath.Cos(), Meta.Numerics.ComplexMath.Cosh(), Meta.Numerics.Functions.AdvancedMath.Coulomb_Steed(), Meta.Numerics.Functions.AdvancedMath.Coulomb_Zero_Series(), Meta.Numerics.Functions.AdvancedComplexMath.DiLog(), Meta.Numerics.Matrices.SquareMatrix.Eigensystem(), Meta.Numerics.Functions.AdvancedComplexMath.Ein(), Meta.Numerics.Functions.AdvancedComplexMath.Erf(), Meta.Numerics.ComplexMath.Exp(), Meta.Numerics.Functions.AdvancedComplexMath.Gamma(), Meta.Numerics.Functions.AdvancedComplexMath.IsEinSeriesPrefered(), Meta.Numerics.Functions.AdvancedComplexMath.LogGamma(), Meta.Numerics.Functions.AdvancedComplexMath.LogGamma_Stirling(), Meta.Numerics.Complex.operator double(), Meta.Numerics.Complex.operator/(), Meta.Numerics.ComplexMath.Pow(), Meta.Numerics.Functions.AdvancedComplexMath.Psi(), Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta(), Meta.Numerics.ComplexMath.Sin(), Meta.Numerics.ComplexMath.Sinh(), Test.OrthogonalPolynomialsTest.SphericalHarmonicNormalization(), Meta.Numerics.ComplexMath.Sqrt(), Test.SquareMatrixTest.SquareVandermondeMatrixEigenvalues(), Meta.Numerics.ComplexMath.Tan(), and Meta.Numerics.ComplexMath.Tanh().
|
get |
Gets the imaginary part of the complex number.
Referenced by Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.ComplexMath.Arg(), Meta.Numerics.Functions.AdvancedMath.Bessel_Steed(), Test.ComplexTest.ComplexComponents(), Test.ComplexTest.ComplexConjugation(), Test.AdvancedComplexMathTest.ComplexDiLogBranchCut(), Test.AdvancedComplexMathTest.ComplexDiLogClausen(), Test.ComplexMathTest.ComplexDoubleAngle(), Test.AdvancedComplexMathTest.ComplexErfFaddevaAgreement(), Test.AdvancedComplexMathTest.ComplexErfFresnel(), Test.AdvancedComplexMathTest.ComplexErfSymmetries(), Test.ComplexMathTest.ComplexExpSumTest(), Test.AdvancedComplexMathTest.ComplexFaddeevaConjugation(), Test.AdvancedComplexMathTest.ComplexFaddeevaDawson(), Test.ComplexMathTest.ComplexIParts(), Test.ComplexMathTest.ComplexNegativeAngles(), Test.AdvancedComplexMathTest.ComplexPsiImaginaryParts(), Test.ComplexMathTest.ComplexPythagorean(), Test.AdvancedComplexMathTest.ComplexRiemannZetaZeros(), Test.ComplexMathTest.ComplexSecTanTest(), Meta.Numerics.ComplexMath.Cos(), Meta.Numerics.ComplexMath.Cosh(), Meta.Numerics.Functions.AdvancedMath.Coulomb_Asymptotic(), Meta.Numerics.Functions.AdvancedMath.Coulomb_Steed(), Meta.Numerics.Functions.AdvancedComplexMath.DiLog(), Meta.Numerics.ComplexMath.Exp(), Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva(), Meta.Numerics.Functions.AdvancedComplexMath.IsEinSeriesPrefered(), Meta.Numerics.Functions.AdvancedComplexMath.LogGamma_Stirling(), Meta.Numerics.Complex.operator double(), Meta.Numerics.Complex.operator/(), Meta.Numerics.ComplexMath.Pow(), Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta(), Meta.Numerics.ComplexMath.Sin(), Meta.Numerics.ComplexMath.Sinh(), Test.OrthogonalPolynomialsTest.SphericalHarmonicNormalization(), Meta.Numerics.ComplexMath.Sqrt(), Meta.Numerics.ComplexMath.Tan(), and Meta.Numerics.ComplexMath.Tanh().
|
get |
Gets the complex conjugate of the complex number.
Referenced by Test.ComplexTest.ComplexConjugation(), Test.AdvancedComplexMathTest.ComplexDiLogConjugation(), Test.AdvancedComplexMathTest.ComplexErfSymmetries(), Test.AdvancedComplexMathTest.ComplexFaddeevaConjugation(), Test.AdvancedComplexMathTest.ComplexGammaConjugation(), Test.AdvancedComplexMathTest.ComplexLogGammaConjugation(), Test.ComplexMathTest.ComplexMagnitude(), Test.AdvancedComplexMathTest.ComplexPsiConjugation(), Meta.Numerics.Functions.AdvancedComplexMath.DiLog(), Test.FourierTest.FourierParseval(), Meta.Numerics.Functions.AdvancedComplexMath.LogGamma_Stirling(), Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta(), Meta.Numerics.Functions.AdvancedMath.SphericalHarmonic(), Test.OrthogonalPolynomialsTest.SphericalHarmonicAddition(), and Test.OrthogonalPolynomialsTest.SphericalHarmonicConjugation().