Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Complex Class Reference

#include <fft.hpp>

List of all members.


Detailed Description

A usual class for a complex numbers.

Complex class implements a complex numbers as pair of two double values. Class contains a small number of operations required in program.

Definition at line 17 of file fft.hpp.

Public Member Functions

 Complex (double _re=0, double _im=0)
 Make complex number from real and imaginary parts.
double GetRe () const
 Get real part of complex number.
double GetIm () const
 Get imaginary part of complex number.
double GetNorm () const
 Get squared (!) norm of complex number. TODO: rename method.
Complex operator+ (const Complex &op2) const
 Addition of complex numbers.
Complex operator- (const Complex &op2) const
 Substraction of complex numbers.
Complex operator * (const Complex &op2) const
 Multiplication of complex numbers.
Complex operator/ (const Complex &op2) const
 Division of complex numbers; check by yourself that op2.norm > 0.
void operator+= (const Complex &op2)
void operator *= (const Complex &op2)
void operator/= (const Complex &op2)


Constructor & Destructor Documentation

Complex::Complex double  _re = 0,
double  _im = 0
 

Make complex number from real and imaginary parts.

Definition at line 6 of file fft.cpp.


Member Function Documentation

double Complex::GetRe  )  const
 

Get real part of complex number.

Definition at line 9 of file fft.cpp.

Referenced by SmoluchowskiCalcFast::calc_L1(), SmoluchowskiCalcFast::calc_L1_fix_f(), SmoluchowskiCalcFast::calc_L2(), and SmoluchowskiCalcFast::calc_L2_fix_f().

double Complex::GetIm  )  const
 

Get imaginary part of complex number.

Definition at line 14 of file fft.cpp.

double Complex::GetNorm  )  const
 

Get squared (!) norm of complex number. TODO: rename method.

Definition at line 19 of file fft.cpp.

Referenced by operator/(), and operator/=().

Complex Complex::operator+ const Complex op2  )  const
 

Addition of complex numbers.

Definition at line 24 of file fft.cpp.

Complex Complex::operator- const Complex op2  )  const
 

Substraction of complex numbers.

Definition at line 30 of file fft.cpp.

Complex Complex::operator * const Complex op2  )  const
 

Multiplication of complex numbers.

Definition at line 36 of file fft.cpp.

Complex Complex::operator/ const Complex op2  )  const
 

Division of complex numbers; check by yourself that op2.norm > 0.

Definition at line 43 of file fft.cpp.

References GetNorm().

void Complex::operator+= const Complex op2  ) 
 

Definition at line 51 of file fft.cpp.

References im, and re.

void Complex::operator *= const Complex op2  ) 
 

Definition at line 57 of file fft.cpp.

References im, and re.

void Complex::operator/= const Complex op2  ) 
 

Definition at line 65 of file fft.cpp.

References GetNorm().


The documentation for this class was generated from the following files:
Generated on Sun May 25 01:58:07 2025 for SmoluchowskiSolver by Doxygen