IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KNComplex.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <math.h>
11 
19 {
20 public:
21  CKNComplex();
22  ~CKNComplex();
23 
24  void GetComplexNumber(double *fReal, double *fImaginary);
25  void SetComplexNumber(double fReal, double fImaginaray);
26  double GetRealNumber() const{ return m_fRealNumber; }
27  double GetImaginaryNumber() const{ return m_fImaginaryNumber; }
29  double GetAbsolute();
30 
31  void SetRealNumber(double fRealNumber){ m_fRealNumber = fRealNumber; }
32  void SetImaginaryNumber(double fImaginaryNumber){ m_fImaginaryNumber = fImaginaryNumber; }
33 
35 
36  void Add(CKNComplex complex);
37  void Minus(CKNComplex complex);
38  void Division(double fScalar);
39  void Multiple(double fScalar);
40 
41  static CKNComplex AddComplex(CKNComplex complex1, CKNComplex complex2);
42  static CKNComplex MinusComplex(CKNComplex complex1, CKNComplex complex2);
43  static CKNComplex MulltiplyComplex(CKNComplex complex1, CKNComplex complex2);
44  static CKNComplex DivideComplex(CKNComplex complex1, CKNComplex complex2);
45  static bool IsSame(CKNComplex complex1, CKNComplex complex2);
46 
47  void operator=(const CKNComplex &complexSrc);
48 
49  CKNComplex operator+(const CKNComplex &complexSrc);
50  CKNComplex operator+=(const CKNComplex &complexSrc);
51 
52  CKNComplex operator-(const CKNComplex &complexSrc);
53  CKNComplex operator-=(const CKNComplex &complexSrc);
54 
55  CKNComplex operator*(const CKNComplex &complexSrc);
56  CKNComplex operator*(double fScalar);
57 
58  CKNComplex operator*=(const CKNComplex &complexSrc);
59  CKNComplex operator*=(double fScalar);
60 
61  CKNComplex operator/(const CKNComplex &complexSrc);
62  CKNComplex operator/(double fScalar);
63 
64  CKNComplex operator/=(const CKNComplex &complexSrc);
65  CKNComplex operator/=(double fScalar);
66 
67  bool operator==(double fScalar);
68  bool operator==(CKNComplex &complexSrc);
69 
70 //private:
71  double m_fRealNumber;
73 };
74 
void Minus(CKNComplex complex)
Minus operation to this class.
Definition: KNComplex.cpp:81
CKNComplex operator-(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:192
static CKNComplex AddComplex(CKNComplex complex1, CKNComplex complex2)
Adding operation between complex numbers.
Definition: KNComplex.cpp:99
double GetImaginaryNumber() const
Get imaginary part.
Definition: KNComplex.h:27
CKNComplex operator*=(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:233
void Division(double fScalar)
Scalar division operation.
Definition: KNComplex.cpp:87
double GetRealNumber() const
Get real part.
Definition: KNComplex.h:26
static CKNComplex DivideComplex(CKNComplex complex1, CKNComplex complex2)
Divide operation between complex numbers.
Definition: KNComplex.cpp:144
void Multiple(double fScalar)
Scalar Multiply operation.
bool operator==(double fScalar)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:302
CKNComplex operator/=(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:279
void GetComplexNumber(double *fReal, double *fImaginary)
Get Complex number real part and imaginary part concurrently.
Definition: KNComplex.cpp:49
double GetNorm()
Get norm of complex number.
Definition: KNComplex.h:34
CKNComplex operator/(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:256
static CKNComplex MinusComplex(CKNComplex complex1, CKNComplex complex2)
Minus operation between complex numbers.
Definition: KNComplex.cpp:113
CKNComplex operator-=(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:201
double m_fRealNumber
Real part of complex number.
Definition: KNComplex.h:71
static bool IsSame(CKNComplex complex1, CKNComplex complex2)
Definition: KNComplex.cpp:324
double GetAbsolute()
Get Absolute value of complex number.
Definition: KNComplex.cpp:24
CKNComplex operator+=(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:183
void Add(CKNComplex complex)
Adding operation to this class.
Definition: KNComplex.cpp:68
CKNComplex operator+(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:174
void SetRealNumber(double fRealNumber)
Set real part.
Definition: KNComplex.h:31
This class for complex operation and saving value.
Definition: KNComplex.h:18
static CKNComplex MulltiplyComplex(CKNComplex complex1, CKNComplex complex2)
Multiple operation between complex numbers.
Definition: KNComplex.cpp:127
CKNComplex GetConjugate()
Get conjugate complex number.
Definition: KNComplex.cpp:35
void operator=(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:165
void SetComplexNumber(double fReal, double fImaginaray)
Set Complex number using real part and imaginary part.
Definition: KNComplex.cpp:59
void SetImaginaryNumber(double fImaginaryNumber)
Set imagenary part.
Definition: KNComplex.h:32
double m_fImaginaryNumber
Imaginary part of complex number.
Definition: KNComplex.h:72
CKNComplex operator*(const CKNComplex &complexSrc)
operation overload for subsitution with reference parameter
Definition: KNComplex.cpp:210