Loading...
Searching...
No Matches
EST_Complex Class Reference

`#include <include/EST_Complex.h>`

## Constructor functions

| EST_Complex ()
| default constructor, initialises values to 0.0
| EST_Complex (double real, double imag)
| Constructor initialising real and imaginary parts.
double | mag () const
| Polar magnitude, read only.
double | ang (int degrees=0) const
| Polar angle, read only.
double & | real ()
| The real part - can be used for reading or writing.
double & | imag ()
| The imaginary part - can be used for reading or writing.
EST_Complex | operator+ (const EST_Complex &z1, const EST_Complex &z2)
EST_Complex | operator+ (const EST_Complex &z, float x)
EST_Complex | operator+ (float x, const EST_Complex &z)
EST_Complex | operator- (const EST_Complex &z1, const EST_Complex &z2)
EST_Complex | operator- (const EST_Complex &z, float x)
EST_Complex | operator- (float x, const EST_Complex &z)
EST_Complex | operator* (const EST_Complex &z1, const EST_Complex &z2)
EST_Complex | operator* (const EST_Complex &z, float x)
EST_Complex | operator* (float x, const EST_Complex &z)
EST_Complex | operator/ (const EST_Complex &z1, const EST_Complex &z2)
EST_Complex | operator/ (const EST_Complex &z, float x)
EST_Complex | operator/ (float x, const EST_Complex &z)
ostream & | operator<< (ostream &s, const EST_Complex &a)

## Detailed Description

A class for complex numbers. The class stores the values as cartesian real and imaginary parts, but these can be read as polar coordinates using the {\tt mag()} and {\tt ang()} functions. Addition, subtraction, multiplication and division are supported.

Definition at line 58 of file EST_Complex.h.

## Constructor & Destructor Documentation

## EST_Complex() [1/2]

EST_Complex::EST_Complex | ( |  | ) |

inline

default constructor, initialises values to 0.0

Definition at line 66 of file EST_Complex.h.

## EST_Complex() [2/2]

EST_Complex::EST_Complex | ( | double | real,
|  | double | imag )

inline

Constructor initialising real and imaginary parts.

Definition at line 68 of file EST_Complex.h.

## Member Function Documentation

## mag()

double EST_Complex::mag | ( |  | ) | const

inline

Polar magnitude, read only.

Definition at line 73 of file EST_Complex.h.

## ang()

double EST_Complex::ang | ( | int | degrees = 0 | ) | const

inline

Polar angle, read only.

Definition at line 77 of file EST_Complex.h.

## real()

double & EST_Complex::real | ( |  | ) |

inline

The real part - can be used for reading or writing.

Definition at line 87 of file EST_Complex.h.

## imag()

double & EST_Complex::imag | ( |  | ) |

inline

The imaginary part - can be used for reading or writing.

Definition at line 89 of file EST_Complex.h.

## Friends And Related Symbol Documentation

## operator+ [1/3]

EST_Complex operator+ | ( | const EST_Complex & | z1,
|  | const EST_Complex & | z2 )

friend

Definition at line 44 of file EST_Complex.cc.

## operator+ [2/3]

EST_Complex operator+ | ( | const EST_Complex & | z,
|  | float | x )

friend

Definition at line 49 of file EST_Complex.cc.

## operator+ [3/3]

EST_Complex operator+ | ( | float | x,
|  | const EST_Complex & | z )

friend

Definition at line 54 of file EST_Complex.cc.

## operator- [1/3]

EST_Complex operator- | ( | const EST_Complex & | z1,
|  | const EST_Complex & | z2 )

friend

Definition at line 61 of file EST_Complex.cc.

## operator- [2/3]

EST_Complex operator- | ( | const EST_Complex & | z,
|  | float | x )

friend

Definition at line 66 of file EST_Complex.cc.

## operator- [3/3]

EST_Complex operator- | ( | float | x,
|  | const EST_Complex & | z )

friend

Definition at line 71 of file EST_Complex.cc.

## operator* [1/3]

EST_Complex operator* | ( | const EST_Complex & | z1,
|  | const EST_Complex & | z2 )

friend

Definition at line 78 of file EST_Complex.cc.

## operator* [2/3]

EST_Complex operator* | ( | const EST_Complex & | z,
|  | float | x )

friend

Definition at line 83 of file EST_Complex.cc.

## operator* [3/3]

EST_Complex operator* | ( | float | x,
|  | const EST_Complex & | z )

friend

Definition at line 88 of file EST_Complex.cc.

## operator/ [1/3]

EST_Complex operator/ | ( | const EST_Complex & | z1,
|  | const EST_Complex & | z2 )

friend

Definition at line 95 of file EST_Complex.cc.

## operator/ [2/3]

EST_Complex operator/ | ( | const EST_Complex & | z,
|  | float | x )

friend

Definition at line 104 of file EST_Complex.cc.

## operator/ [3/3]

EST_Complex operator/ | ( | float | x,
|  | const EST_Complex & | z )

friend

Definition at line 109 of file EST_Complex.cc.

## operator<<

ostream & operator<< | ( | ostream & | s,
|  | const EST_Complex & | a )

friend

Definition at line 105 of file EST_Complex.h.

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

- include/EST_Complex.h