C# Class Encog.MathUtil.ComplexNumber

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
Mostra file Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
Arg ( ) : double

Argument of this Complex number (the angle in radians with the x-axis in polar coordinates).

ComplexNumber ( ComplexNumber other ) : System

Create a complex number from another complex number.

ComplexNumber ( double u, double v ) : System

Constructs the complex number z = u + i*v

Conj ( ) : ComplexNumber

Complex conjugate of this Complex number (the conjugate of x+i*y is x-i*y).

Cos ( ) : ComplexNumber

Cosine of this Complex number (doesn't change this Complex number). cos(z) = (exp(i*z)+exp(-i*z))/ 2.

Cosh ( ) : ComplexNumber

Hyperbolic cosine of this Complex number (doesn't change this Complex number). cosh(z) = (exp(z) + exp(-z)) / 2.

Exp ( ) : ComplexNumber

Complex exponential (doesn't change this Complex number).

Log ( ) : ComplexNumber

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.

Mod ( ) : double

Modulus of this Complex number (the distance from the origin in polar coordinates).

Sin ( ) : ComplexNumber

Sine of this Complex number (doesn't change this Complex number). sin(z) = (exp(i*z)-exp(-i*z))/(2*i).

Sinh ( ) : ComplexNumber

Hyperbolic sine of this Complex number (doesn't change this Complex number). sinh(z) = (exp(z)-exp(-z))/2.

Sqrt ( ) : ComplexNumber

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 ( ) : ComplexNumber

Tangent of this Complex number (doesn't change this Complex number).

ToString ( ) : String
operator ( ) : ComplexNumber

Addition of Complex numbers (doesn't change this Complex number). (x+i*y) + (s+i*t) = (x+s)+i*(y+t)

Private Methods

Method Description
Cosh ( double theta ) : double

Real cosh function (used to compute complex trig functions).

Sinh ( double theta ) : double

Real sinh function (used to compute complex trig functions).

Method Details

Arg() public method

Argument of this Complex number (the angle in radians with the x-axis in polar coordinates).
public Arg ( ) : double
return double

ComplexNumber() public method

Create a complex number from another complex number.
public ComplexNumber ( ComplexNumber other ) : System
other ComplexNumber The other complex number.
return System

ComplexNumber() public method

Constructs the complex number z = u + i*v
public ComplexNumber ( double u, double v ) : System
u double Real part
v double Imaginary part
return System

Conj() public method

Complex conjugate of this Complex number (the conjugate of x+i*y is x-i*y).
public Conj ( ) : ComplexNumber
return ComplexNumber

Cos() public method

Cosine of this Complex number (doesn't change this Complex number). cos(z) = (exp(i*z)+exp(-i*z))/ 2.
public Cos ( ) : ComplexNumber
return ComplexNumber

Cosh() public method

Hyperbolic cosine of this Complex number (doesn't change this Complex number). cosh(z) = (exp(z) + exp(-z)) / 2.
public Cosh ( ) : ComplexNumber
return ComplexNumber

Exp() public method

Complex exponential (doesn't change this Complex number).
public Exp ( ) : ComplexNumber
return ComplexNumber

Log() public method

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.
public Log ( ) : ComplexNumber
return ComplexNumber

Mod() public method

Modulus of this Complex number (the distance from the origin in polar coordinates).
public Mod ( ) : double
return double

Sin() public method

Sine of this Complex number (doesn't change this Complex number). sin(z) = (exp(i*z)-exp(-i*z))/(2*i).
public Sin ( ) : ComplexNumber
return ComplexNumber

Sinh() public method

Hyperbolic sine of this Complex number (doesn't change this Complex number). sinh(z) = (exp(z)-exp(-z))/2.
public Sinh ( ) : ComplexNumber
return ComplexNumber

Sqrt() public method

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.
public Sqrt ( ) : ComplexNumber
return ComplexNumber

Tan() public method

Tangent of this Complex number (doesn't change this Complex number).
public Tan ( ) : ComplexNumber
return ComplexNumber

ToString() public method

public ToString ( ) : String
return String

operator() public static method

Addition of Complex numbers (doesn't change this Complex number). (x+i*y) + (s+i*t) = (x+s)+i*(y+t)
public static operator ( ) : ComplexNumber
return ComplexNumber