|
IPCC
1.0
|
This class for complex operation and saving value. More...
#include "Complex.h"

Public Member Functions | |
| CComplex () | |
| ~CComplex () | |
| void | GetComplexNumber (double *fReal, double *fImaginary) |
| Get Complex number real part and imaginary part concurrently. More... | |
| void | SetComplexNumber (double fReal, double fImaginaray) |
| Set Complex number using real part and imaginary part. More... | |
| double | GetRealNumber () const |
| Get real part. More... | |
| double | GetImaginaryNumber () const |
| Get imaginary part. More... | |
| CComplex | GetConjugate () |
| Get conjugate complex number. More... | |
| double | GetAbsolute () |
| Get Absolute value of complex number. More... | |
| void | SetRealNumber (double fRealNumber) |
| Set real part. More... | |
| void | SetImaginaryNumber (double fImaginaryNumber) |
| Set imagenary part. More... | |
| double | GetNorm () |
| Get norm of complex number. More... | |
| void | Add (CComplex complex) |
| Adding operation to this class. More... | |
| void | Minus (CComplex complex) |
| Minus operation to this class. More... | |
| void | Division (double fScalar) |
| Scalar division operation. More... | |
| void | Multiple (double fScalar) |
| Scalar Multiply operation. More... | |
| void | operator= (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator+ (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator+= (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator- (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator-= (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator* (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator* (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator*= (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator*= (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator/ (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator/ (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator/= (const CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CComplex | operator/= (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| bool | operator== (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| bool | operator== (CComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
Static Public Member Functions | |
| static CComplex | AddComplex (CComplex complex1, CComplex complex2) |
| Adding operation between complex numbers. More... | |
| static CComplex | MinusComplex (CComplex complex1, CComplex complex2) |
| Minus operation between complex numbers. More... | |
| static CComplex | MulltiplyComplex (CComplex complex1, CComplex complex2) |
| Multiple operation between complex numbers. More... | |
| static CComplex | DivideComplex (CComplex complex1, CComplex complex2) |
| Divide operation between complex numbers. More... | |
| static bool | IsSame (CComplex complex1, CComplex complex2) |
Public Attributes | |
| double | m_fRealNumber |
| Real part of complex number. More... | |
| double | m_fImaginaryNumber |
| Imaginary part of complex number. More... | |
This class for complex operation and saving value.
| CComplex::CComplex | ( | ) |
Definition at line 10 of file Complex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| CComplex::~CComplex | ( | ) |
Definition at line 16 of file Complex.cpp.
| void CComplex::Add | ( | CComplex | complex | ) |
Adding operation to this class.
| complex | operand |
Definition at line 67 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), m_fImaginaryNumber, and m_fRealNumber.
Referenced by CMatrixOperation::MMMul(), and CMatrixOperation::MVMul().


Adding operation between complex numbers.
| complex1 | operand 1 |
| complex2 | operand 2 |
Definition at line 98 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().
Referenced by operator+(), and operator+=().


Divide operation between complex numbers.
| complex1 | operand 1 |
| complex2 | operand 2 |
Definition at line 143 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().
Referenced by operator/(), and operator/=().


| void CComplex::Division | ( | double | fScalar | ) |
Scalar division operation.
Definition at line 86 of file Complex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| double CComplex::GetAbsolute | ( | ) |
Get Absolute value of complex number.
Definition at line 23 of file Complex.cpp.
References GetImaginaryNumber(), and GetRealNumber().
Referenced by CLanczosMethod::BuildWaveFunction(), and CLanczosMethod::RecalcuWaveFunction().


| void CComplex::GetComplexNumber | ( | double * | fReal, |
| double * | fImaginary | ||
| ) |
Get Complex number real part and imaginary part concurrently.
| [out] | fReal | Real part |
| [out] | fImaginary | Imaginary part |
Definition at line 48 of file Complex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| CComplex CComplex::GetConjugate | ( | ) |
Get conjugate complex number.
Definition at line 34 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), SetImaginaryNumber(), and SetRealNumber().

|
inline |
Get imaginary part.
Definition at line 25 of file Complex.h.
References m_fImaginaryNumber.
Referenced by Add(), AddComplex(), CMPIManager::AllReduceComlex(), CMatrixOperation::CDMatrix::AppendMatrix(), CMatrixOperation::BuildLocalCSR(), DivideComplex(), GetAbsolute(), GetConjugate(), CMatrixOperation::CCSR::InsertMatrix(), CMatrixOperation::CVector::InsertVector(), IsSame(), CMatrixOperation::IsSame(), Minus(), MinusComplex(), CMatrixOperation::CVector::MinusVector(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), CMatrixOperation::CVector::PlusVector(), CMatrixOperation::CCSR::PushMatrix(), CMatrixOperation::CCSR::PushMatrixConcurrent(), CMatrixOperation::CCSR::PushMatrixConcurrentPE(), CGeometricShape::RefillPeriodicBinding(), CMatrixOperation::CVector::ReorthogonalizationVector(), CLanczosMethod::SaveLanczosResult(), CMatrixOperation::CVector::ScalarDivision(), CMatrixOperation::CVector::ScalarMultiple(), CMatrixOperation::ScalarMulVectors(), CMatrixOperation::CVector::SetAt(), CMatrixOperation::CCSR::SetAt(), CMatrixOperation::CVector::SetAtEx(), CMatrixOperation::CDMatrix::SetElement(), CUtility::ShowComplex(), CUtility::ShowCSR(), CUtility::ShowDenseMatrix(), CUtility::ShowDoubleVector(), and CMatrixOperation::UpdateLocalCSR().

|
inline |
Get norm of complex number.
Definition at line 32 of file Complex.h.
References m_fImaginaryNumber, and m_fRealNumber.
Referenced by CLanczosResultAudit::AuditResult_WF().

|
inline |
Get real part.
Definition at line 24 of file Complex.h.
References m_fRealNumber.
Referenced by Add(), AddComplex(), CMPIManager::AllReduceComlex(), CMatrixOperation::CDMatrix::AppendMatrix(), CMatrixOperation::BuildLocalCSR(), CHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CGeometricShape::BuildPEBiasVector(), CGeometricShape::BuildPEWaveVector(), CZincblendeParam::CalculateLatticeCoonstants(), DivideComplex(), CSPLoop::executeSPLoop(), CHamiltonianBuilder::FillMatrixFor10Band(), GetAbsolute(), GetConjugate(), CMatrixOperation::Gram_schmidt(), CMatrixOperation::CCSR::InsertMatrix(), CMatrixOperation::CVector::InsertVector(), IsSame(), CMatrixOperation::IsSame(), CLanczosMethod::LanczosIterationLoop(), CLanczosMethod::MergeDegeneratedEigenvalues(), Minus(), MinusComplex(), CMatrixOperation::CVector::MinusVector(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), CMatrixOperation::CVector::PlusVector(), CMatrixOperation::CCSR::PushMatrix(), CMatrixOperation::CCSR::PushMatrixConcurrent(), CMatrixOperation::CCSR::PushMatrixConcurrentPE(), CGeometricShape::RefillPeriodicBinding(), CMatrixOperation::CVector::ReorthogonalizationVector(), IGeometricUnitCellInfo::RotateAxis(), IGeometricUnitCellInfo::RotateNeighbor(), CHamiltonianBuilder::RotateTransMatrixFor10Band(), CLanczosMethod::SaveLanczosResult(), CMatrixOperation::CVector::ScalarDivision(), CMatrixOperation::CVector::ScalarMultiple(), CMatrixOperation::ScalarMulVectors(), CMatrixOperation::CVector::SetAt(), CMatrixOperation::CCSR::SetAt(), CMatrixOperation::CVector::SetAtEx(), CMatrixOperation::CDMatrix::SetElement(), CUtility::ShowComplex(), CUtility::ShowCSR(), CUtility::ShowDenseMatrix(), CUtility::ShowDoubleVector(), and CMatrixOperation::UpdateLocalCSR().
| complex1 | Comparing source 1 |
| complex2 | Comparing source 2 |
Definition at line 323 of file Complex.cpp.
References GENERAL_TOLERANCE, GetImaginaryNumber(), and GetRealNumber().
Referenced by operator==().


| void CComplex::Minus | ( | CComplex | complex | ) |
Minus operation to this class.
| complex | operand |
Definition at line 80 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), m_fImaginaryNumber, and m_fRealNumber.

Minus operation between complex numbers.
| complex1 | operand 1 |
| complex2 | operand 2 |
Definition at line 112 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().
Referenced by operator-(), and operator-=().


Multiple operation between complex numbers.
| complex1 | operand 1 |
| complex2 | operand 2 |
Definition at line 126 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().
Referenced by CMatrixOperation::MMMul(), CMatrixOperation::MVMul(), operator*(), and operator*=().


| void CComplex::Multiple | ( | double | fScalar | ) |
Scalar Multiply operation.
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 209 of file Complex.cpp.
References MulltiplyComplex().

| CComplex CComplex::operator* | ( | double | fScalar | ) |
operation overload for subsitution with reference parameter
| fScalar | Scalar number that want to multiply |
Definition at line 220 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 232 of file Complex.cpp.
References MulltiplyComplex().

| CComplex CComplex::operator*= | ( | double | fScalar | ) |
operation overload for subsitution with reference parameter
| fScalar | Scalar number that want to multiply |
Definition at line 243 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 173 of file Complex.cpp.
References AddComplex().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 182 of file Complex.cpp.
References AddComplex().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 191 of file Complex.cpp.
References MinusComplex().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 200 of file Complex.cpp.
References MinusComplex().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 255 of file Complex.cpp.
References DivideComplex().

| CComplex CComplex::operator/ | ( | double | fScalar | ) |
operation overload for subsitution with reference parameter
| fScalar | Scalar number that want to divide |
Definition at line 266 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().

operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 278 of file Complex.cpp.
References DivideComplex().

| CComplex CComplex::operator/= | ( | double | fScalar | ) |
operation overload for subsitution with reference parameter
| fScalar | Scalar number that want to divide |
Definition at line 289 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().

| void CComplex::operator= | ( | const CComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 164 of file Complex.cpp.
References GetImaginaryNumber(), GetRealNumber(), and SetComplexNumber().

| bool CComplex::operator== | ( | double | fScalar | ) |
operation overload for subsitution with reference parameter
| fScalar | Scalar number that want to compare |
Definition at line 301 of file Complex.cpp.
References IsSame(), and SetComplexNumber().

| bool CComplex::operator== | ( | CComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | Complex number that want to divide |
Definition at line 313 of file Complex.cpp.
References IsSame().

| void CComplex::SetComplexNumber | ( | double | fReal, |
| double | fImaginaray | ||
| ) |
Set Complex number using real part and imaginary part.
| fReal | Real part |
| fImaginary | Imaginary part |
Definition at line 58 of file Complex.cpp.
References SetImaginaryNumber(), and SetRealNumber().
Referenced by AddComplex(), CMPIManager::AllReduceComlex(), CLanczosResultAudit::AuditResult_WF(), DivideComplex(), CMatrixOperation::CVector::GetAt(), CMatrixOperation::CCSR::GetElement(), MinusComplex(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), operator==(), CGeometricShape::RefillPeriodicBinding(), CMatrixOperation::CVector::ScalarDivision(), CMatrixOperation::CVector::ScalarMultiple(), and CMatrixOperation::VVDot().


|
inline |
Set imagenary part.
Definition at line 30 of file Complex.h.
References m_fImaginaryNumber.
Referenced by GetConjugate(), SetComplexNumber(), and CMatrixOperation::UpdateLocalCSR().

|
inline |
Set real part.
Definition at line 29 of file Complex.h.
References m_fRealNumber.
Referenced by CTBMS_Solver::ApplyPhPotential(), CHamiltonianBuilder::FillMatrixFor10Band(), GetConjugate(), SetComplexNumber(), and CMatrixOperation::UpdateLocalCSR().

| double CComplex::m_fImaginaryNumber |
Imaginary part of complex number.
Definition at line 70 of file Complex.h.
Referenced by Add(), CComplex(), Division(), GetComplexNumber(), GetImaginaryNumber(), GetNorm(), Minus(), and SetImaginaryNumber().
| double CComplex::m_fRealNumber |
Real part of complex number.
Definition at line 69 of file Complex.h.
Referenced by Add(), CComplex(), Division(), GetComplexNumber(), GetNorm(), GetRealNumber(), Minus(), and SetRealNumber().