IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Complex class that can only represent real numbers (imaginary part is always 0). Attempt to set an imaginary part different than 0 always throws an exception. More...
Public Member Functions | |
ComplexRealClass () | |
ComplexRealClass (double x) | |
ComplexRealClass (ComplexClass a) | |
override string | ToString () |
Returns string representation of the current complex number that is real (imaginary part 0). More... | |
![]() | |
ComplexClass () | |
Default (parameter-less) constructor, creates 0+0*i. More... | |
ComplexClass (double real, double imaginary) | |
Initializes a complex number with specified real and imaginary part. More... | |
ComplexClass (complex a) | |
Initializes a complex number with another complex number of type complex. More... | |
ComplexClass (double a) | |
Initializes a complex number with another complex number of type complex. More... | |
ComplexClass (ComplexClass a) | |
Initializes a complex number with another complex number. More... | |
override string | ToString () |
Returns a string representation of the complec number in the form "(2.3+4.5*i)". More... | |
double | Absolute () |
Returns an absolute value of the complex number. More... | |
ComplexClass | Conjugate () |
Complex conjugate. More... | |
Properties | |
override double | Im [get, protected set] |
Gets (public access) or sets (protected access) the imaginary part of the complex number. Setting imaginary part different than 0 throws an exception. More... | |
double | SquaredAbs [get] |
Returns squared absolute value of the current complex number. Equals to squared real part for this class (since imaginary part is always 0). More... | |
override double | Abs [get] |
Modulus (absolute value) of the current complex number. Equals to absolute value of the real part for this class (since imaginary part is always 0). More... | |
override double | Fi [get] |
Argument of the current complex number. Equals to 0 for this class (since imaginary part is always 0). More... | |
![]() | |
complex | Base [get] |
Returns a struct of type complex that represents the same complex number as the current class. More... | |
virtual double | Re [get, protected set] |
Gets (public access) or sets (protected access) the real part of the complex number. More... | |
virtual double | Im [get, protected set] |
Gets (public access) or sets (protected access) the imaginary part of the complex number. More... | |
double | SquaredAbs [get] |
Returns squared absolute value of the current complex number. More... | |
virtual double | Abs [get] |
Gets modulus (absolute value) of the complex number. More... | |
virtual double | Fi [get] |
Argument of the complex number. More... | |
static ComplexClass | Zero [get] |
Complex constant 0 + 0*i (summation unit) More... | |
static ComplexClass | One [get] |
Complex constant 1 + 0*i (multiplication unit). More... | |
static ComplexClass | I [get] |
Complex constant 1 + 0*i (summation unit) More... | |
double | this[int index] [get, set] |
Index operator - index 0 for real part and 1 for imaginary part of a complex number. More... | |
double | this[string index] [get, set] |
Index operator where a string index defines what to get or to set. More... | |
![]() | |
double | Re [get] |
Real part of the current complex number. More... | |
double | Im [get] |
Imaginary part of the current complex number. More... | |
double | SquaredAbs [get] |
Returns squared absolute value of the current complex number. More... | |
double | Abs [get] |
Modulus (absolute value) of the current complex number. More... | |
double | Fi [get] |
Argument of the current complex number. More... | |
Additional Inherited Members | |
![]() | |
static ComplexClass | operator+ (ComplexClass a, ComplexClass b) |
Binary operator + for summation of two complex numbers. More... | |
static ComplexClass | operator- (ComplexClass a, ComplexClass b) |
Binary operator - subtraction of two complex numbers. More... | |
static ComplexClass | operator- (ComplexClass a) |
Unary operator - changing sign of a complex number. More... | |
static ComplexClass | operator* (double a, ComplexClass c) |
Left multiplication of a complex number by a real number. More... | |
static ComplexClass | operator* (ComplexClass c, double a) |
Right multiplication of a complex number by a real number. More... | |
static ComplexClass | operator* (ComplexClass a, ComplexClass b) |
Complex multiplication. More... | |
static ComplexClass | operator/ (ComplexClass a, ComplexClass b) |
Complex division. More... | |
static implicit | operator ComplexClass (double number) |
Implicit conversion from double to Complex. More... | |
static implicit | operator ComplexClass (complex complexStruct) |
Implicit conversion from complex (struct) to Complex. More... | |
static ComplexClass | Polar (double r, double fi) |
static double | Absolute (ComplexClass a) |
Returns an absolute value of the specified complex number. More... | |
static ComplexClass | Conjugate (ComplexClass a) |
Returns a complex conjugate of the argument. More... | |
static void | Example () |
Example of using the complex class. More... | |
Complex class that can only represent real numbers (imaginary part is always 0). Attempt to set an imaginary part different than 0 always throws an exception.
$A Igor Apr09 Mar11;
|
inline |
|
inline |
|
inline |
References IG.Num.ComplexClass.Im, and IG.Num.ComplexClass.Re.
|
inline |
Returns string representation of the current complex number that is real (imaginary part 0).
Referenced by IG.Num.ComplexClass.Example().
|
getprotected set |
Gets (public access) or sets (protected access) the imaginary part of the complex number. Setting imaginary part different than 0 throws an exception.
|
get |
Returns squared absolute value of the current complex number. Equals to squared real part for this class (since imaginary part is always 0).
|
get |
Modulus (absolute value) of the current complex number. Equals to absolute value of the real part for this class (since imaginary part is always 0).
|
get |
Argument of the current complex number. Equals to 0 for this class (since imaginary part is always 0).