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

Public Member Functions | |
| CKNComplex () | |
| ~CKNComplex () | |
| 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... | |
| CKNComplex | 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 (CKNComplex complex) |
| Adding operation to this class. More... | |
| void | Minus (CKNComplex 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 CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator+ (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator+= (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator- (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator-= (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator* (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator* (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator*= (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator*= (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator/ (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator/ (double fScalar) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | operator/= (const CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
| CKNComplex | 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== (CKNComplex &complexSrc) |
| operation overload for subsitution with reference parameter More... | |
Static Public Member Functions | |
| static CKNComplex | AddComplex (CKNComplex complex1, CKNComplex complex2) |
| Adding operation between complex numbers. More... | |
| static CKNComplex | MinusComplex (CKNComplex complex1, CKNComplex complex2) |
| Minus operation between complex numbers. More... | |
| static CKNComplex | MulltiplyComplex (CKNComplex complex1, CKNComplex complex2) |
| Multiple operation between complex numbers. More... | |
| static CKNComplex | DivideComplex (CKNComplex complex1, CKNComplex complex2) |
| Divide operation between complex numbers. More... | |
| static bool | IsSame (CKNComplex complex1, CKNComplex 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.
Definition at line 18 of file KNComplex.h.
| CKNComplex::CKNComplex | ( | ) |
Definition at line 11 of file KNComplex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| CKNComplex::~CKNComplex | ( | ) |
Definition at line 17 of file KNComplex.cpp.
| void CKNComplex::Add | ( | CKNComplex | complex | ) |
Adding operation to this class.
| complex | operand |
Definition at line 68 of file KNComplex.cpp.
References GetImaginaryNumber(), GetRealNumber(), m_fImaginaryNumber, and m_fRealNumber.
Referenced by CKNMatrixOperation::MMMul(), and CKNMatrixOperation::MVMul().


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


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


| void CKNComplex::Division | ( | double | fScalar | ) |
Scalar division operation.
Definition at line 87 of file KNComplex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| double CKNComplex::GetAbsolute | ( | ) |
Get Absolute value of complex number.
Definition at line 24 of file KNComplex.cpp.
References GetImaginaryNumber(), and GetRealNumber().
Referenced by CKNLanczosMethod::BuildWaveFunction(), and CKNLanczosMethod::RecalcuWaveFunction().


| void CKNComplex::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 49 of file KNComplex.cpp.
References m_fImaginaryNumber, and m_fRealNumber.
| CKNComplex CKNComplex::GetConjugate | ( | ) |
Get conjugate complex number.
Definition at line 35 of file KNComplex.cpp.
References GetImaginaryNumber(), GetRealNumber(), SetImaginaryNumber(), and SetRealNumber().

|
inline |
Get imaginary part.
Definition at line 27 of file KNComplex.h.
References m_fImaginaryNumber.
Referenced by Add(), AddComplex(), CKNMPIManager::AllReduceComlex(), CKNMatrixOperation::CKNDMatrix::AppendMatrix(), CKNMatrixOperation::BuildLocalCSR(), CKNMPIManager::ConvertVectorToMPIComplexBuffer(), DivideComplex(), GetAbsolute(), GetConjugate(), CKNMatrixOperation::CKNCSR::InsertMatrix(), CKNMatrixOperation::CKNVector::InsertVector(), IsSame(), CKNMatrixOperation::IsSame(), Minus(), MinusComplex(), CKNMatrixOperation::CKNVector::MinusVector(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), CKNMatrixOperation::CKNVector::PlusVector(), CKNMatrixOperation::CKNCSR::PushMatrix(), CKNMatrixOperation::CKNCSR::PushMatrixConcurrent(), CKNMatrixOperation::CKNVector::ReorthogonalizationVector(), CKNLanczosMethod::SaveLanczosResult(), CKNLanczosTest::SaveResult(), CKNMatrixOperation::CKNVector::ScalarDivision(), CKNMatrixOperation::CKNVector::ScalarMultiple(), CKNMatrixOperation::CKNVector::SetAt(), CKNMatrixOperation::CKNCSR::SetAt(), CKNMatrixOperation::CKNVector::SetAtEx(), CKNMatrixOperation::CKNDMatrix::SetElement(), CKNIPCCUtility::ShowComplex(), CKNMatrixDebug::ShowComplex(), CKNIPCCUtility::ShowCSR(), CKNMatrixDebug::ShowCSR(), CKNIPCCUtility::ShowDenseMatrix(), CKNMatrixDebug::ShowDenseMatrix(), CKNMatrixDebug::ShowDoubleVector(), CKNIPCCUtility::ShowDoubleVector(), and CKNMatrixOperation::UpdateLocalCSR().

|
inline |
Get norm of complex number.
Definition at line 34 of file KNComplex.h.
References m_fImaginaryNumber, and m_fRealNumber.
Referenced by CKNLanczosTest::AuditResult_WF(), and CKNLanczosResultAudit::AuditResult_WF().

|
inline |
Get real part.
Definition at line 26 of file KNComplex.h.
References m_fRealNumber.
Referenced by Add(), AddComplex(), CKNMPIManager::AllReduceComlex(), CKNMatrixOperation::CKNDMatrix::AppendMatrix(), CKNMatrixOperation::BuildLocalCSR(), CKNHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CKNZincblendeParam::CalculateLatticeCoonstants(), CKNMPIManager::ConvertVectorToMPIComplexBuffer(), DivideComplex(), CKNHamiltonianBuilder::FillMatrixFor10Band(), GetAbsolute(), GetConjugate(), CKNMatrixOperation::Gram_schmidt(), CKNMatrixOperation::CKNCSR::InsertMatrix(), CKNMatrixOperation::CKNVector::InsertVector(), IsSame(), CKNMatrixOperation::IsSame(), CKNLanczosMethod::LanczosIterationLoop(), CKNLanczosMethod::MergeDegeneratedEigenvalues(), Minus(), MinusComplex(), CKNMatrixOperation::CKNVector::MinusVector(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), CKNMatrixOperation::CKNVector::PlusVector(), CKNMatrixOperation::CKNCSR::PushMatrix(), CKNMatrixOperation::CKNCSR::PushMatrixConcurrent(), CKNMatrixOperation::CKNVector::ReorthogonalizationVector(), IKNGeometricUnitCellInfo::RotateAxis(), IKNGeometricUnitCellInfo::RotateNeighbor(), CKNHamiltonianBuilder::RotateTransMatrixFor10Band(), CKNLanczosMethod::SaveLanczosResult(), CKNLanczosTest::SaveResult(), CKNMatrixOperation::CKNVector::ScalarDivision(), CKNMatrixOperation::CKNVector::ScalarMultiple(), CKNMatrixOperation::CKNVector::SetAt(), CKNMatrixOperation::CKNCSR::SetAt(), CKNMatrixOperation::CKNVector::SetAtEx(), CKNMatrixOperation::CKNDMatrix::SetElement(), CKNMatrixDebug::ShowComplex(), CKNIPCCUtility::ShowComplex(), CKNIPCCUtility::ShowCSR(), CKNMatrixDebug::ShowCSR(), CKNMatrixDebug::ShowDenseMatrix(), CKNIPCCUtility::ShowDenseMatrix(), CKNMatrixDebug::ShowDoubleVector(), CKNIPCCUtility::ShowDoubleVector(), and CKNMatrixOperation::UpdateLocalCSR().
|
static |
| complex1 | Comparing source 1 |
| complex2 | Comparing source 2 |
Definition at line 324 of file KNComplex.cpp.
References GENERAL_TOLERANCE, GetImaginaryNumber(), and GetRealNumber().
Referenced by operator==().


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

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


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


| void CKNComplex::Multiple | ( | double | fScalar | ) |
Scalar Multiply operation.
| CKNComplex CKNComplex::operator* | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 210 of file KNComplex.cpp.
References MulltiplyComplex().

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

| CKNComplex CKNComplex::operator*= | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 233 of file KNComplex.cpp.
References MulltiplyComplex().

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

| CKNComplex CKNComplex::operator+ | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 174 of file KNComplex.cpp.
References AddComplex().

| CKNComplex CKNComplex::operator+= | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 183 of file KNComplex.cpp.
References AddComplex().

| CKNComplex CKNComplex::operator- | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 192 of file KNComplex.cpp.
References MinusComplex().

| CKNComplex CKNComplex::operator-= | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 201 of file KNComplex.cpp.
References MinusComplex().

| CKNComplex CKNComplex::operator/ | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 256 of file KNComplex.cpp.
References DivideComplex().

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

| CKNComplex CKNComplex::operator/= | ( | const CKNComplex & | complexSrc | ) |
operation overload for subsitution with reference parameter
| complexSrc | opperand |
Definition at line 279 of file KNComplex.cpp.
References DivideComplex().

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

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

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

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

| void CKNComplex::SetComplexNumber | ( | double | fReal, |
| double | fImaginaray | ||
| ) |
Set Complex number using real part and imaginary part.
| fReal | Real part |
| fImaginary | Imaginary part |
Definition at line 59 of file KNComplex.cpp.
References SetImaginaryNumber(), and SetRealNumber().
Referenced by AddComplex(), CKNMPIManager::AllReduceComlex(), CKNLanczosTest::AuditResult_WF(), CKNLanczosResultAudit::AuditResult_WF(), DivideComplex(), CKNMatrixOperation::CKNVector::GetAt(), CKNMatrixOperation::CKNCSR::GetElement(), MinusComplex(), MulltiplyComplex(), operator*(), operator*=(), operator/(), operator/=(), operator=(), operator==(), CKNGeometricShape::RefillPeriodicBinding(), CKNMatrixOperation::CKNVector::ScalarDivision(), CKNMatrixOperation::CKNVector::ScalarMultiple(), CKNLanczosTest::TestCSRBuilding(), and CKNMatrixOperation::VVDot().


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

|
inline |
Set real part.
Definition at line 31 of file KNComplex.h.
References m_fRealNumber.
Referenced by CKNTBMS_Solver::ApplyPhPotential(), CKNHamiltonianBuilder::FillMatrixFor10Band(), GetConjugate(), SetComplexNumber(), and CKNMatrixOperation::UpdateLocalCSR().

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