NeurApp 1.1
NeurApp - software for exploring approximation by artificial neural networks on functions of one or two variables.

IG::Num::ComplexClass Class Reference

Class representing general complex numbers. More...

Inheritance diagram for IG::Num::ComplexClass:
Collaboration diagram for IG::Num::ComplexClass:

List of all members.

Public Member Functions

 ComplexClass ()
 Default (parameter-less) constructor, creates 0+0*i.
 ComplexClass (double real, double imaginary)
 Initializes a complex number with specified real and imaginary part.
 ComplexClass (complex a)
 Initializes a complex number with another complex number of type complex.
 ComplexClass (double a)
 Initializes a complex number with another complex number of type complex.
 ComplexClass (ComplexClass a)
 Initializes a complex number with another complex number.
override string ToString ()
 Returns a string representation of the complec number in the form "(2.3+4.5*i)".
double Absolute ()
 Returns an absolute value of the complex number.
ComplexClass Conjugate ()
 Complex conjugate.

Static Public Member Functions

static ComplexClass operator+ (ComplexClass a, ComplexClass b)
 Binary operator + for summation of two complex numbers.
static ComplexClass operator- (ComplexClass a, ComplexClass b)
 Binary operator - subtraction of two complex numbers.
static ComplexClass operator- (ComplexClass a)
 Unary operator - changing sign of a complex number.
static ComplexClass operator* (double a, ComplexClass c)
 Left multiplication of a complex number by a real number.
static ComplexClass operator* (ComplexClass c, double a)
 Right multiplication of a complex number by a real number.
static ComplexClass operator* (ComplexClass a, ComplexClass b)
 Complex multiplication.
static ComplexClass operator/ (ComplexClass a, ComplexClass b)
 Complex division.
static implicit operator ComplexClass (double number)
 Implicit conversion from double to Complex.
static implicit operator ComplexClass (complex complexStruct)
 Implicit conversion from complex (struct) to Complex.
static ComplexClass Polar (double r, double fi)
static double Absolute (ComplexClass a)
 Returns an absolute value of the specified complex number.
static ComplexClass Conjugate (ComplexClass a)
 Returns a complex conjugate of the argument.
static void Example ()
 Example of using the complex class.

Properties

complex Base [get]
 Returns a struct of type complex that represents the same complex number as the current class.
virtual double Re [get, set]
 Gets (public access) or sets (protected access) the real part of the complex number.
virtual double Im [get, set]
 Gets (public access) or sets (protected access) the imaginary part of the complex number.
double SquaredAbs [get]
 Returns squared absolute value of the current complex number.
virtual double Abs [get]
 Gets modulus (absolute value) of the complex number.
virtual double Fi [get]
 Argument of the complex number.
static ComplexClass Zero [get]
 Complex constant 0 + 0*i (summation unit)
static ComplexClass One [get]
 Complex constant 1 + 0*i (multiplication unit).
static ComplexClass I [get]
 Complex constant 1 + 0*i (summation unit)
double this [int index] [get, set]
 Index operator - index 0 for real part and 1 for imaginary part of a complex number.

Private Attributes

complex _base

Static Private Attributes

static ComplexClass _zero = null
static ComplexClass _one = null
static ComplexClass _i = null

Detailed Description

Class representing general complex numbers.

$A Igor Apr09 Mar11;


Constructor & Destructor Documentation

IG::Num::ComplexClass::ComplexClass ( ) [inline]

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

IG::Num::ComplexClass::ComplexClass ( 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::Num::ComplexClass::ComplexClass ( complex  a) [inline]

Initializes a complex number with another complex number of type complex.

Parameters:
aComplex number whose copy is created in this constructor.
IG::Num::ComplexClass::ComplexClass ( double  a) [inline]

Initializes a complex number with another complex number of type complex.

Parameters:
aComplex number whose copy is created in this constructor.
IG::Num::ComplexClass::ComplexClass ( ComplexClass  a) [inline]

Initializes a complex number with another complex number.

Parameters:
aComplex number whose copy is created in this constructor.

Member Function Documentation

static ComplexClass IG::Num::ComplexClass::operator+ ( ComplexClass  a,
ComplexClass  b 
) [inline, static]

Binary operator + for summation of two complex numbers.

static ComplexClass IG::Num::ComplexClass::operator- ( ComplexClass  a,
ComplexClass  b 
) [inline, static]

Binary operator - subtraction of two complex numbers.

static ComplexClass IG::Num::ComplexClass::operator- ( ComplexClass  a) [inline, static]

Unary operator - changing sign of a complex number.

static ComplexClass IG::Num::ComplexClass::operator* ( double  a,
ComplexClass  c 
) [inline, static]

Left multiplication of a complex number by a real number.

static ComplexClass IG::Num::ComplexClass::operator* ( ComplexClass  c,
double  a 
) [inline, static]

Right multiplication of a complex number by a real number.

static ComplexClass IG::Num::ComplexClass::operator* ( ComplexClass  a,
ComplexClass  b 
) [inline, static]

Complex multiplication.

static ComplexClass IG::Num::ComplexClass::operator/ ( ComplexClass  a,
ComplexClass  b 
) [inline, static]

Complex division.

static implicit IG::Num::ComplexClass::operator ComplexClass ( double  number) [inline, static]

Implicit conversion from double to Complex.

Parameters:
numberNumber that is converted.
Returns:
Complex number that is a result of conversion from the specified number..
static implicit IG::Num::ComplexClass::operator ComplexClass ( complex  complexStruct) [inline, static]

Implicit conversion from complex (struct) to Complex.

Parameters:
numberNumber that is converted.
Returns:
Complex number that is a result of conversion from the specified number..
static ComplexClass IG::Num::ComplexClass::Polar ( double  r,
double  fi 
) [inline, static]
override string IG::Num::ComplexClass::ToString ( ) [inline]

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

Reimplemented in IG::Num::ComplexRealClass.

double IG::Num::ComplexClass::Absolute ( ) [inline]

Returns an absolute value of the complex number.

Implements IG::Num::IComplex.

static double IG::Num::ComplexClass::Absolute ( ComplexClass  a) [inline, static]

Returns an absolute value of the specified complex number.

Parameters:
aComplex number whose absolute value is returned.
ComplexClass IG::Num::ComplexClass::Conjugate ( ) [inline]

Complex conjugate.

static ComplexClass IG::Num::ComplexClass::Conjugate ( ComplexClass  a) [inline, static]

Returns a complex conjugate of the argument.

static void IG::Num::ComplexClass::Example ( ) [inline, static]

Example of using the complex class.

Complex class will be seldom used, usually the complex struct will be used instead (which is a value type).


Member Data Documentation

ComplexClass IG::Num::ComplexClass::_zero = null [static, private]
ComplexClass IG::Num::ComplexClass::_one = null [static, private]
ComplexClass IG::Num::ComplexClass::_i = null [static, private]

Property Documentation

complex IG::Num::ComplexClass::Base [get]

Returns a struct of type complex that represents the same complex number as the current class.

virtual double IG::Num::ComplexClass::Re [get, set]

Gets (public access) or sets (protected access) the real part of the complex number.

Implements IG::Num::IComplex.

virtual double IG::Num::ComplexClass::Im [get, set]

Gets (public access) or sets (protected access) the imaginary part of the complex number.

Implements IG::Num::IComplex.

Reimplemented in IG::Num::ComplexRealClass.

double IG::Num::ComplexClass::SquaredAbs [get]

Returns squared absolute value of the current complex number.

Implements IG::Num::IComplex.

Reimplemented in IG::Num::ComplexRealClass.

virtual double IG::Num::ComplexClass::Abs [get]

Gets modulus (absolute value) of the complex number.

Implements IG::Num::IComplex.

Reimplemented in IG::Num::ComplexRealClass.

virtual double IG::Num::ComplexClass::Fi [get]

Argument of the complex number.

Implements IG::Num::IComplex.

Reimplemented in IG::Num::ComplexRealClass.

ComplexClass IG::Num::ComplexClass::Zero [static, get]

Complex constant 0 + 0*i (summation unit)

ComplexClass IG::Num::ComplexClass::One [static, get]

Complex constant 1 + 0*i (multiplication unit).

ComplexClass IG::Num::ComplexClass::I [static, get]

Complex constant 1 + 0*i (summation unit)

double IG::Num::ComplexClass::this [get, set]

Index operator - index 0 for real part and 1 for imaginary part of a complex number.

Index operator where a string index defines what to get or to set.

Parameters:
indexInteger index that can be 0 (for real part of the complex number) or 1 (for imaginary part).

For information about possible values of index, see struct complex.

Parameters:
indexString that defines what to get or to set.

Possible indices read/write (for precise informatin, see struct complex): re, Re, real, Real: real part of the complex number im, Im, imaginary, Imaginary: imaginary part of the complex number Possible indices - read only: r, R: modulus (absolute value) of the complex number fi, Fi: argument of the complex number


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties