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.Old.Complex_OldNumerics Class Reference

Class representing general complex numbers. More...

+ Inheritance diagram for IG.Old.Complex_OldNumerics:
+ Collaboration diagram for IG.Old.Complex_OldNumerics:

Public Member Functions

 Complex_OldNumerics ()
 Default (parameter-less) constructor, creates 0+0*i. More...
 
 Complex_OldNumerics (double real, double imaginary)
 Initializes a complex number with specified real and imaginary part. More...
 
 Complex_OldNumerics (Complex_OldNumerics a)
 Initializes a complex number with another complex number. More...
 
Complex_OldNumerics Add (Complex_OldNumerics x)
 
Complex_OldNumerics Subtract (Complex_OldNumerics x)
 
Complex_OldNumerics Multiply (Complex_OldNumerics x)
 
Complex_OldNumerics Divide (Complex_OldNumerics x)
 
Complex_OldNumerics Negative ()
 
Complex_OldNumerics Inverse ()
 
override string ToString ()
 Returns a string representation of the complec number in the form "2.3+4.5*i". More...
 
double Abs ()
 Absolute value of the complex number. More...
 
Complex_OldNumerics Conjugate ()
 Complex conjugate. More...
 

Static Public Member Functions

static Complex_OldNumerics operator+ (Complex_OldNumerics a, Complex_OldNumerics b)
 Defines the binary operator + for summation of two complex numbers. More...
 
static Complex_OldNumerics operator- (Complex_OldNumerics a, Complex_OldNumerics b)
 Defines the binary operator - for subtraction of two complex numbers. More...
 
static Complex_OldNumerics operator- (Complex_OldNumerics a)
 Defines the unary operator - for changing sign of a complex number. More...
 
static Complex_OldNumerics operator* (double a, Complex_OldNumerics c)
 Left multiplication of a complex number by a real number. More...
 
static Complex_OldNumerics operator* (Complex_OldNumerics c, double a)
 Right multiplication of a complex number by a real number. More...
 
static Complex_OldNumerics operator* (Complex_OldNumerics a, Complex_OldNumerics b)
 Complex multiplication. More...
 
static Complex_OldNumerics operator/ (Complex_OldNumerics a, Complex_OldNumerics b)
 
static Complex_OldNumerics Polar (double r, double fi)
 
static double Abs (Complex_OldNumerics a)
 Returns an absolute value of a complex number. More...
 
static Complex_OldNumerics Conjugate (Complex_OldNumerics a)
 Returns a complex conjugate of the argument. More...
 
static void Example ()
 

Properties

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...
 
virtual double r [get]
 Modulus of the complex number More...
 
virtual double fi [get]
 Argument of the complex number. More...
 
static Complex_OldNumerics Zero [get]
 Complex constant 0 + 0*i (summation unit) More...
 
static Complex_OldNumerics One [get]
 Complex constant 1 + 0*i (summation unit) More...
 
static Complex_OldNumerics i [get]
 Complex constant 1 + 0*i (summation unit) More...
 
double this[int index] [get, set]
 
double this[string index] [get, set]
 
- Properties inherited from IG.Old.IComplex_OldNumerics
double Re [get]
 
double Im [get]
 
double r [get]
 
double fi [get]
 

Private Attributes

double _real = 0
 
double _imaginary = 0
 

Static Private Attributes

static Complex_OldNumerics _zero = null
 
static Complex_OldNumerics _one = null
 
static Complex_OldNumerics _i = null
 

Detailed Description

Class representing general complex numbers.

Constructor & Destructor Documentation

IG.Old.Complex_OldNumerics.Complex_OldNumerics ( )
inline

Default (parameter-less) constructor, creates 0+0*i.

IG.Old.Complex_OldNumerics.Complex_OldNumerics ( double  real,
double  imaginary 
)
inline

Initializes a complex number with specified real and imaginary part.

Parameters
realValue assigned to the real part of the created complex number.
imaginaryValue assigned to the imaginary part of the created complex number.
IG.Old.Complex_OldNumerics.Complex_OldNumerics ( Complex_OldNumerics  a)
inline

Initializes a complex number with another complex number.

Parameters
aComplex number whose copy is created in this constructor.

References IG.Old.Complex_OldNumerics.Im, and IG.Old.Complex_OldNumerics.Re.

Member Function Documentation

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator+ ( Complex_OldNumerics  a,
Complex_OldNumerics  b 
)
inlinestatic

Defines the binary operator + for summation of two complex numbers.

References IG.Old.Complex_OldNumerics.Im, IG.Old.Complex_OldNumerics.Re, and IG.Old.Complex_OldNumerics.Zero.

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator- ( Complex_OldNumerics  a,
Complex_OldNumerics  b 
)
inlinestatic

Defines the binary operator - for subtraction of two complex numbers.

References IG.Old.Complex_OldNumerics.Im, IG.Old.Complex_OldNumerics.Re, and IG.Old.Complex_OldNumerics.Zero.

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator- ( Complex_OldNumerics  a)
inlinestatic

Defines the unary operator - for changing sign of a complex number.

References IG.Old.Complex_OldNumerics.Im, IG.Old.Complex_OldNumerics.Re, and IG.Old.Complex_OldNumerics.Zero.

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator* ( double  a,
Complex_OldNumerics  c 
)
inlinestatic

Left multiplication of a complex number by a real number.

References IG.Old.Complex_OldNumerics.Im, IG.Old.Complex_OldNumerics.Re, and IG.Old.Complex_OldNumerics.Zero.

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator* ( Complex_OldNumerics  c,
double  a 
)
inlinestatic

Right multiplication of a complex number by a real number.

References IG.Old.Complex_OldNumerics.Im, IG.Old.Complex_OldNumerics.Re, and IG.Old.Complex_OldNumerics.Zero.

static Complex_OldNumerics IG.Old.Complex_OldNumerics.operator* ( Complex_OldNumerics  a,
Complex_OldNumerics  b 
)
inlinestatic
Complex_OldNumerics IG.Old.Complex_OldNumerics.Add ( Complex_OldNumerics  x)
inline
Complex_OldNumerics IG.Old.Complex_OldNumerics.Subtract ( Complex_OldNumerics  x)
inline
Complex_OldNumerics IG.Old.Complex_OldNumerics.Multiply ( Complex_OldNumerics  x)
inline
Complex_OldNumerics IG.Old.Complex_OldNumerics.Divide ( Complex_OldNumerics  x)
inline
Complex_OldNumerics IG.Old.Complex_OldNumerics.Negative ( )
inline
Complex_OldNumerics IG.Old.Complex_OldNumerics.Inverse ( )
inline
static Complex_OldNumerics IG.Old.Complex_OldNumerics.Polar ( double  r,
double  fi 
)
inlinestatic
override string IG.Old.Complex_OldNumerics.ToString ( )
inline

Returns a string representation of the complec number in the form "2.3+4.5*i".

Referenced by IG.Old.Complex_OldNumerics.Example().

double IG.Old.Complex_OldNumerics.Abs ( )
inline

Absolute value of the complex number.

Implements IG.Old.IComplex_OldNumerics.

static double IG.Old.Complex_OldNumerics.Abs ( Complex_OldNumerics  a)
inlinestatic

Returns an absolute value of a complex number.

References IG.Old.Complex_OldNumerics.Im, and IG.Old.Complex_OldNumerics.Re.

Complex_OldNumerics IG.Old.Complex_OldNumerics.Conjugate ( )
inline
static Complex_OldNumerics IG.Old.Complex_OldNumerics.Conjugate ( Complex_OldNumerics  a)
inlinestatic

Returns a complex conjugate of the argument.

References IG.Old.Complex_OldNumerics.Im, and IG.Old.Complex_OldNumerics.Re.

static void IG.Old.Complex_OldNumerics.Example ( )
inlinestatic

Member Data Documentation

double IG.Old.Complex_OldNumerics._real = 0
private
double IG.Old.Complex_OldNumerics._imaginary = 0
private
Complex_OldNumerics IG.Old.Complex_OldNumerics._zero = null
staticprivate
Complex_OldNumerics IG.Old.Complex_OldNumerics._one = null
staticprivate
Complex_OldNumerics IG.Old.Complex_OldNumerics._i = null
staticprivate

Property Documentation

virtual double IG.Old.Complex_OldNumerics.r
get

Modulus of the complex number

virtual double IG.Old.Complex_OldNumerics.fi
get

Argument of the complex number.

Complex_OldNumerics IG.Old.Complex_OldNumerics.One
staticget

Complex constant 1 + 0*i (summation unit)

Referenced by IG.Old.ComplexVector_OldNumerics.Inverse().

Complex_OldNumerics IG.Old.Complex_OldNumerics.i
staticget

Complex constant 1 + 0*i (summation unit)

double IG.Old.Complex_OldNumerics.this[int index]
getset
double IG.Old.Complex_OldNumerics.this[string index]
getset

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