A complex number class. This class is based on source code by
Andrew G. Bennett, Department of Mathematics
Kansas State University
The original version can be found here:
http://www.math.ksu.edu/~bennett/jomacg/c.html
Inheritance Hierarchy
Encog.MathUtil ComplexNumber
Namespace: Encog.MathUtil
Assembly: encogcorecs (in encogcorecs.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax
The ComplexNumber type exposes the following members.
Constructors
Name  Description  

ComplexNumber(ComplexNumber) 
Create a complex number from another complex number.
 
ComplexNumber(Double, Double) 
Constructs the complex number z = u + i*v

Methods
Name  Description  

Arg 
Argument of this Complex number
(the angle in radians with the xaxis in polar coordinates).
 
Conj 
Complex conjugate of this Complex number
(the conjugate of x+i*y is xi*y).
 
Cos 
Cosine of this Complex number (doesn't change this Complex number).
cos(z) = (exp(i*z)+exp(i*z))/ 2.
 
Cosh 
Hyperbolic cosine of this Complex number
(doesn't change this Complex number).
cosh(z) = (exp(z) + exp(z)) / 2.
 
Equals  (Inherited from Object.)  
Exp 
Complex exponential (doesn't change this Complex number).
 
Finalize  Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)  
GetHashCode  Serves as a hash function for a particular type. (Inherited from Object.)  
GetType  Gets the type of the current instance. (Inherited from Object.)  
Log 
Principal branch of the Complex logarithm of this Complex number.
(doesn't change this Complex number).
The principal branch is the branch with pi less arg lesequals pi.
 
MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)  
Mod 
Modulus of this Complex number
(the distance from the origin in polar coordinates).
 
Sin 
Sine of this Complex number (doesn't change this Complex number).
sin(z) = (exp(i*z)exp(i*z))/(2*i).
 
Sinh 
Hyperbolic sine of this Complex number
(doesn't change this Complex number).
sinh(z) = (exp(z)exp(z))/2.
 
Sqrt 
Complex square root (doesn't change this complex number).
Computes the principal branch of the square root, which
is the value with 0 less equals arg less pi.
 
Tan 
Tangent of this Complex number (doesn't change this Complex number).
 
ToString 
Operators
Name  Description  

Addition 
Addition of Complex numbers (doesn't change this Complex number).
(x+i*y) + (s+i*t) = (x+s)+i*(y+t)
 
Division 
Division of Complex numbers.
 
Multiply 
Multiplication of Complex numbers.
 
Subtraction 
Subtraction of Complex numbers.
(xi*y) + (si*t) = (xs)+i*(yt)
 
UnaryNegation 
Negative of this complex number (chs stands for change sign).
This produces a new Complex number and doesn't change
this Complex number.
(x+i*y) = xi*y.

Properties
Name  Description  

Imaginary 
Imaginary part of this Complex number
 
Real 
Real part of this Complex number
(the xcoordinate in rectangular coordinates).

See Also