Complex Class |
Namespace: Algs4Net
public class Complex
The Complex type exposes the following members.
Name | Description | |
---|---|---|
![]() | Im |
Returns the imaginary part of this complex number. |
![]() | Re |
Returns the real part of this complex number. |
Name | Description | |
---|---|---|
![]() | Abs | Returns the absolute value of this complex number, or angle/phase/argument.
This quantity is also known as the Modulus or Magnitude. |
![]() | Conjugate |
Returns the complex conjugate of this complex number. |
![]() | Cos |
Returns the complex cosine of this complex number. |
![]() | Exp |
Returns the complex exponential of this complex number. |
![]() ![]() | MainTest |
Demo test the Complex data type. |
![]() | Phase | Returns the phase of this complex number.
This quantity is also known as the Ange or Argument. |
![]() | Reciprocal |
Returns the reciprocal of this complex number. |
![]() | Scale |
Returns the product of this complex number and the specified scalar. |
![]() | Sin |
Returns the complex sine of this complex number. |
![]() | Tan |
Returns the complex tangent of this complex number. |
![]() | ToString |
Returns a string representation of this complex number. (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
![]() ![]() | Addition |
Returns the sum of this complex number and the specified complex number. |
![]() ![]() | Division |
Returns the result of dividing the specified complex number into
this complex number. |
![]() ![]() | Multiply |
Returns the product of this complex number and the specified complex number. |
![]() ![]() | Subtraction |
Returns the result of subtracting the specified complex number from
this complex number. |
For additional documentation, see Section 9.9 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class Complex implementation by the respective authors.