IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.ComplexRealClass Class Reference

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...

+ Inheritance diagram for IG.Num.ComplexRealClass:
+ Collaboration diagram for IG.Num.ComplexRealClass:

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...
 
- Public Member Functions inherited from IG.Num.ComplexClass
 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...
 
- Properties inherited from IG.Num.ComplexClass
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...
 
- Properties inherited from IG.Num.IComplex
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 Public Member Functions inherited from IG.Num.ComplexClass
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...
 

Detailed Description

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;

Constructor & Destructor Documentation

IG.Num.ComplexRealClass.ComplexRealClass ( )
inline
IG.Num.ComplexRealClass.ComplexRealClass ( double  x)
inline
IG.Num.ComplexRealClass.ComplexRealClass ( ComplexClass  a)
inline

Member Function Documentation

override string IG.Num.ComplexRealClass.ToString ( )
inline

Returns string representation of the current complex number that is real (imaginary part 0).

Referenced by IG.Num.ComplexClass.Example().

Property Documentation

override double IG.Num.ComplexRealClass.Im
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.

double IG.Num.ComplexRealClass.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).

override double IG.Num.ComplexRealClass.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).

override double IG.Num.ComplexRealClass.Fi
get

Argument of the current complex number. Equals to 0 for this class (since imaginary part is always 0).


The documentation for this class was generated from the following file: