|
IPCC
1.0
|
Data and operation representation of Matrix. More...
#include "MatrixOperation.h"

Public Types | |
| enum | APPEND_DRIECTION { ROW_DIRECTION, COLUMN_DIRECTION } |
Public Member Functions | |
| CDMatrix () | |
| Constructor. More... | |
| ~CDMatrix () | |
| Destructor. More... | |
| bool | BuildMatrixFirst (unsigned int nRow, unsigned int nColumn) |
| Building matrix elements. More... | |
| bool | SetElement (unsigned int nRow, unsigned int nColumn, CComplex element) |
| Set matrix elements value. More... | |
| bool | SetElement (unsigned int nRow, unsigned int nColumn, double fRealNumber, double fImageNumber) |
| Set matrix elements value. More... | |
| void | AppendMatrix (APPEND_DRIECTION direction, unsigned int nCount) |
| Appending matrix with direction. More... | |
| unsigned int | GetRowCount () |
| Get matrix row counts. More... | |
| unsigned int | GetColumnCount () |
| Get matrix column counts. More... | |
| bool | SetDiagonal (CVector vector) |
| Set diagonal elements. More... | |
| CComplex | GetElement (unsigned int nRowIndex, unsigned int nColumnIndex) |
| Get matrix element with row, column index. More... | |
| bool | SetColumnElement (CVector vector, unsigned int nColumnIndex) |
| Set matrix column. More... | |
| bool | SetRowElement (CVector vector, unsigned int nRowIndex) |
| Set matrix element with row, column index. More... | |
| bool | SetElement (unsigned int nRowStart, unsigned int nColumnStart, unsigned int nSrcRowStart, unsigned int nSrcColumnStart, unsigned int nSrcRowCount, unsigned int nSrcColumnCount, CDMatrix matrix) |
| Set elements with arrange information. More... | |
| void | ScalarMultiple (CComplex Scalar) |
| Scalar multiple operation. More... | |
| void | ScalarMultiple (double fScalar) |
| Scalar multiple operation. More... | |
| bool | GetRowByVector (unsigned int nRowIndex, CMatrixOperation::CVector *pVector) |
| Get row elements. More... | |
| bool | GetColumnByVector (unsigned int nColumnIndex, CMatrixOperation::CVector *pVector) |
| Get column elements. More... | |
| bool | GetSmallMatrix (unsigned int nRowStartIndex, unsigned int nColumnStartIndex, unsigned int nRowCount, unsigned int nColumnCount, CMatrixOperation::CDMatrix *pMatrix) |
| Get matrix from large matrix. More... | |
| void | ScalarDivision (double fScalar) |
| Scalar division operation. More... | |
| bool | TrnasPos () |
| Transpos matrix. More... | |
| void | operator= (CDMatrix &matrix) |
| operation overload for subsitution with reference parameter More... | |
| void | operator= (CDMatrix *matrix) |
| operation overload for subsitution with pointer parameter More... | |
| void | operator+= (CDMatrix &matrix) |
| operation overload for adding with reference parameter More... | |
| void | operator+= (CDMatrix *matrix) |
| operation overload for adding with pointer parameter More... | |
Private Attributes | |
| std::vector< CComplex > | m_vectValueBuffer |
| A member variable for saving none zero elements. More... | |
| unsigned int | m_nRowCount |
| A numbers of row. More... | |
| unsigned int | m_nColumnCount |
| A numbers of column. More... | |
Data and operation representation of Matrix.
Definition at line 120 of file MatrixOperation.h.
| Enumerator | |
|---|---|
| ROW_DIRECTION | |
| COLUMN_DIRECTION | |
Definition at line 125 of file MatrixOperation.h.
| CMatrixOperation::CDMatrix::CDMatrix | ( | ) |
Constructor.
CVector Class member function - End
CDMatrix Class member function - Start
Definition at line 571 of file MatrixOperation.cpp.
| CMatrixOperation::CDMatrix::~CDMatrix | ( | ) |
| void CMatrixOperation::CDMatrix::AppendMatrix | ( | APPEND_DRIECTION | direction, |
| unsigned int | nCount | ||
| ) |
Appending matrix with direction.
| direction | Appending direction |
| nCount | Appending size |
Definition at line 675 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), and CComplex::GetRealNumber().

| bool CMatrixOperation::CDMatrix::BuildMatrixFirst | ( | unsigned int | nRow, |
| unsigned int | nColumn | ||
| ) |
Building matrix elements.
| nRow | Row size |
| nColumn | Column size |
Definition at line 584 of file MatrixOperation.cpp.
Referenced by CHamiltonianBuilder::BuildACCANeighborFor10Band(), CZincblendeParam::BuildBondVector(), CZincblendeParam::BuildMatrix(), CHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CGeometricShape::BuildPEHamiltonian(), CGeometricShape::BuildRotationMatrix(), CHamiltonianBuilder::FillMatrixFor10Band(), CHamiltonianBuilder::InitMatirxsFor10BandFillMatrix(), CMatrixOperation::MMMul(), and CGeometricShape::RotateMatrix().

| bool CMatrixOperation::CDMatrix::GetColumnByVector | ( | unsigned int | nColumnIndex, |
| CMatrixOperation::CVector * | pVector | ||
| ) |
Get column elements.
| nColumnIndex | Target column index |
| pVector[out] | Vector that column saving |
Definition at line 818 of file MatrixOperation.cpp.
References CMatrixOperation::CVector::SetAt(), and CMatrixOperation::CVector::SetSize().

|
inline |
Get matrix column counts.
Definition at line 132 of file MatrixOperation.h.
References m_nColumnCount.
Referenced by CZincblendeParam::BuildBondVector(), GetSmallMatrix(), CMatrixOperation::CCSR::InsertMatrix(), CMatrixOperation::MMMul(), CMatrixOperation::MVMul(), operator+=(), and operator=().

| CComplex CMatrixOperation::CDMatrix::GetElement | ( | unsigned int | nRowIndex, |
| unsigned int | nColumnIndex | ||
| ) |
Get matrix element with row, column index.
| nRowIndex | Target row index |
| nColumnIndex | Target column index |
Definition at line 734 of file MatrixOperation.cpp.
Referenced by CZincblendeParam::CalculateLatticeCoonstants(), CHamiltonianBuilder::FillMatrixFor10Band(), CMatrixOperation::CCSR::InsertMatrix(), CMatrixOperation::MMMul(), CMatrixOperation::MVMul(), operator+=(), operator=(), CMatrixOperation::CCSR::PushMatrix(), CMatrixOperation::CCSR::PushMatrixConcurrent(), CMatrixOperation::CCSR::PushMatrixConcurrentPE(), SetElement(), and CUtility::ShowDenseMatrix().

| bool CMatrixOperation::CDMatrix::GetRowByVector | ( | unsigned int | nRowIndex, |
| CMatrixOperation::CVector * | pVector | ||
| ) |
Get row elements.
| nRowIndex | Target row index |
| pVector[out] | Vector that column saving |
Definition at line 839 of file MatrixOperation.cpp.
References CMatrixOperation::CVector::SetAt(), and CMatrixOperation::CVector::SetSize().
Referenced by CHamiltonianBuilder::BuildOffsiteMatrixFor10Band().


|
inline |
Get matrix row counts.
Definition at line 131 of file MatrixOperation.h.
References m_nRowCount.
Referenced by CZincblendeParam::BuildBondVector(), GetSmallMatrix(), CMatrixOperation::CCSR::InsertMatrix(), CMatrixOperation::MMMul(), CMatrixOperation::MVMul(), operator+=(), and operator=().

| bool CMatrixOperation::CDMatrix::GetSmallMatrix | ( | unsigned int | nRowStartIndex, |
| unsigned int | nColumnStartIndex, | ||
| unsigned int | nRowCount, | ||
| unsigned int | nColumnCount, | ||
| CMatrixOperation::CDMatrix * | pMatrix | ||
| ) |
Get matrix from large matrix.
| nRowStartIndex | Start index of target row |
| nColumnStartIndex | Start index of target column |
| nRowCount | Copy size or row |
| nColumnCount | Copy size of column |
| pMatrix | Source matrix |
Definition at line 863 of file MatrixOperation.cpp.
References GetColumnCount(), GetRowCount(), and SetElement().
Referenced by CHamiltonianBuilder::FillMatrixFor10Band().


| void CMatrixOperation::CDMatrix::operator+= | ( | CDMatrix & | matrix | ) |
operation overload for adding with reference parameter
| matrix | Matrix operand |
Definition at line 912 of file MatrixOperation.cpp.
References GetColumnCount(), GetElement(), and GetRowCount().

| void CMatrixOperation::CDMatrix::operator+= | ( | CDMatrix * | matrix | ) |
operation overload for adding with pointer parameter
| matrix | Matrix operand |
Definition at line 904 of file MatrixOperation.cpp.
| void CMatrixOperation::CDMatrix::operator= | ( | CDMatrix & | matrix | ) |
operation overload for subsitution with reference parameter
| matrix | Matrix operand |
Definition at line 939 of file MatrixOperation.cpp.
References GetColumnCount(), GetElement(), and GetRowCount().

| void CMatrixOperation::CDMatrix::operator= | ( | CDMatrix * | matrix | ) |
operation overload for subsitution with pointer parameter
| matrix | Matrix operand |
Definition at line 931 of file MatrixOperation.cpp.
| void CMatrixOperation::CDMatrix::ScalarDivision | ( | double | fScalar | ) |
Scalar division operation.
| fScalar | Scalar factor |
Definition at line 893 of file MatrixOperation.cpp.
Referenced by CHamiltonianBuilder::FillMatrixFor10Band().

| void CMatrixOperation::CDMatrix::ScalarMultiple | ( | CComplex | Scalar | ) |
Scalar multiple operation.
| fScalar | Scalar value that want to use in operation |
Definition at line 786 of file MatrixOperation.cpp.
Referenced by CZincblendeParam::BuildBondVector().

| void CMatrixOperation::CDMatrix::ScalarMultiple | ( | double | fScalar | ) |
Scalar multiple operation.
| fScalar | Scalar value that want to use in operation |
Definition at line 799 of file MatrixOperation.cpp.
| bool CMatrixOperation::CDMatrix::SetColumnElement | ( | CVector | vector, |
| unsigned int | nColumnIndex | ||
| ) |
Set matrix column.
| vector | Source vector |
| nColumnIndex | Target column index |
Definition at line 744 of file MatrixOperation.cpp.
References CMatrixOperation::CVector::GetAt(), and CMatrixOperation::CVector::GetSize().

| bool CMatrixOperation::CDMatrix::SetDiagonal | ( | CVector | vector | ) |
Set diagonal elements.
| vector | Source vector |
Definition at line 712 of file MatrixOperation.cpp.
References CMatrixOperation::CVector::GetAt(), and CMatrixOperation::CVector::GetSize().
Referenced by CHamiltonianBuilder::BuildHonsiteBasicMatrixFor10Band().


| bool CMatrixOperation::CDMatrix::SetElement | ( | unsigned int | nRow, |
| unsigned int | nColumn, | ||
| CComplex | element | ||
| ) |
Set matrix elements value.
| nRow | Target row index |
| nColumn | Target column index |
| element | Value that want to set |
Definition at line 614 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), and CComplex::GetRealNumber().
Referenced by CHamiltonianBuilder::BuildACCANeighborFor10Band(), CZincblendeParam::BuildBondVector(), CGeometricShape::BuildPEHamiltonian(), CGeometricShape::BuildRotationMatrix(), CHamiltonianBuilder::FillMatrixFor10Band(), GetSmallMatrix(), CHamiltonianBuilder::InitMatirxsFor10BandFillMatrix(), CMatrixOperation::MMMul(), and CGeometricShape::RotateMatrix().


| bool CMatrixOperation::CDMatrix::SetElement | ( | unsigned int | nRow, |
| unsigned int | nColumn, | ||
| double | fRealNumber, | ||
| double | fImageNumber | ||
| ) |
Set matrix elements value.
| nRow | Target row index |
| nColumn | Target column index |
| fRealNumber | Real number that want to set |
| fImageNumber | Imaginary number that want to set |
Definition at line 626 of file MatrixOperation.cpp.
| bool CMatrixOperation::CDMatrix::SetElement | ( | unsigned int | nRowStart, |
| unsigned int | nColumnStart, | ||
| unsigned int | nSrcRowStart, | ||
| unsigned int | nSrcColumnStart, | ||
| unsigned int | nSrcRowCount, | ||
| unsigned int | nSrcColumnCount, | ||
| CDMatrix | matrix | ||
| ) |
Set elements with arrange information.
| nRowStart | Target row index want to set data |
| nColumnStart | Target column index want to set data |
| nSrcRowStart | Start row index of source that want to copy |
| nSrcColumnStart | Start column index of source that want to copy |
| nSrcRowCount | Row count that want to copy |
| nSrcColumnCount | Column count that want to copy |
| matrix | Source matrix |
Definition at line 649 of file MatrixOperation.cpp.
References GetElement().

| bool CMatrixOperation::CDMatrix::SetRowElement | ( | CVector | vector, |
| unsigned int | nRowIndex | ||
| ) |
Set matrix element with row, column index.
| vector | Source vector |
| nRowIndex | Target row index |
Definition at line 766 of file MatrixOperation.cpp.
References CMatrixOperation::CVector::GetAt(), and CMatrixOperation::CVector::GetSize().
Referenced by CZincblendeParam::BuildMatrix().


| bool CMatrixOperation::CDMatrix::TrnasPos | ( | ) |
Transpos matrix.
Definition at line 954 of file MatrixOperation.cpp.
Referenced by CHamiltonianBuilder::BuildACCANeighborFor10Band(), CGeometricShape::BuildRotationMatrix(), CHamiltonianBuilder::FillMatrixFor10Band(), and CGeometricShape::RotateMatrix().

|
private |
A numbers of column.
Definition at line 154 of file MatrixOperation.h.
Referenced by GetColumnCount().
|
private |
|
private |
A member variable for saving none zero elements.
Definition at line 152 of file MatrixOperation.h.