﻿ComplexNumber Class
 ComplexNumber Class Encog Machine Learning Framework for .Net
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

System Object
Encog.MathUtil ComplexNumber

Namespace: Encog.MathUtil
Assembly: encog-core-cs (in encog-core-cs.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax

`public class ComplexNumber`

The ComplexNumber type exposes the following members.

Constructors

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

NameDescription
Arg
Argument of this Complex number (the angle in radians with the x-axis in polar coordinates).
Conj
Complex conjugate of this Complex number (the conjugate of x+i*y is x-i*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
Determines whether the specified Object is equal to the current Object.
(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 les-equals 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
Top
Operators

NameDescription
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. (x-i*y) + (s-i*t) = (x-s)+i*(y-t)
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) = -x-i*y.
Top
Properties

NameDescription
Imaginary
Imaginary part of this Complex number
Real
Real part of this Complex number (the x-coordinate in rectangular coordinates).
Top
See Also