Edinburgh Speech Tools  2.1-release
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Friends | List of all members
EST_Complex Class Reference

A class for complex numbers. More...

#include <include/EST_Complex.h>

Public Member Functions

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.
 
Constructor functions
 EST_Complex ()
 default constructor, initialises values to 0.0
 
 EST_Complex (double real, double imag)
 Constructor initialising real and imaginary parts.
 

Friends

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 EST_Complex::mag() and EST_Complex::ang() methods. Addition, subtraction, multiplication and division are supported.

Definition at line 60 of file EST_Complex.h.


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