#include <PHM.h>
|
| PHM (int, int) |
|
| PHM (const PHM &)=default |
|
| PHM (PHM &&)=default |
|
virtual | ~PHM ()=default |
|
PHM & | operator= (const PHM &)=default |
|
PHM & | operator= (PHM &&)=default |
|
double | operator() (int a, int b, int c, int d) const |
|
const Matrix & | getBlock (int a, int b) const |
|
Matrix & | getBlock (int a, int b) |
|
int | gN () const |
|
int | gL () const |
|
void | G (const TPM &) |
|
Matrix | Gimg (const TPM &) const |
|
Matrix | Gbuild () const |
|
void | sep_pm (BlockMatrix &, BlockMatrix &) |
|
void | sqrt (int) |
|
void | invert () |
|
void | L_map (const BlockMatrix &, const BlockMatrix &) |
|
void | WriteToFile (hid_t &group_id) const |
|
void | ReadFromFile (hid_t &group_id) |
|
void | WriteFullToFile (hid_t &group_id) const |
|
void | setDim (int, int, int) |
|
BlockStructure & | operator+= (const BlockStructure< BlockType > &) |
|
BlockStructure & | operator-= (const BlockStructure< BlockType > &) |
|
BlockStructure & | daxpy (double alpha, const BlockStructure< BlockType > &) |
|
BlockStructure & | operator*= (double) |
|
BlockStructure & | operator/= (double) |
|
BlockType & | operator[] (int block) |
|
const BlockType & | operator[] (int block) const |
|
double & | operator() (int block, int i, int j) |
|
double | operator() (int block, int i, int j) const |
|
double & | operator() (int block, int index) |
|
double | operator() (int block, int index) const |
|
int | gnr () const |
|
int | gdim (int) const |
|
int | gdeg (int) const |
|
double | trace () const |
|
double | ddot (const BlockStructure< BlockType > &) const |
|
void | dscal (double alpha) |
|
double | min () const |
|
double | max () const |
|
void | fill_Random () |
|
void | fill_Random (int) |
|
virtual void | L_map (const BlockStructure< BlockType > &, const BlockStructure< BlockType > &) |
|
virtual BlockStructure< BlockType > & | mprod (const BlockStructure< BlockType > &, const BlockStructure< BlockType > &) |
|
void | symmetrize () |
|
void | sort () |
|
template<> |
void | sort () |
|
virtual void | sep_pm (BlockStructure< BlockType > &, BlockStructure< BlockType > &) |
|
|
static std::unique_ptr< helpers::tmatrix< int > > | s2ph = nullptr |
| table translating single particles indices to two particle indices More...
|
|
static std::unique_ptr< helpers::tmatrix< int > > | ph2s = nullptr |
| table translating two particles indices to single particle indices More...
|
|
static std::unique_ptr< helpers::tmatrix< int > > | s2b = nullptr |
| table translating single particles indices to the correct 2x2 block More...
|
|
static std::unique_ptr< helpers::tmatrix< int > > | b2s = nullptr |
| table translating the block index to the single particle indices More...
|
|
Definition at line 38 of file PHM.h.
PHM::PHM |
( |
int |
L, |
|
|
int |
N |
|
) |
| |
- Parameters
-
L | the number of levels |
N | the number of particles |
Definition at line 40 of file PHM.cpp.
doci2DM::PHM::PHM |
( |
const PHM & |
| ) |
|
|
default |
doci2DM::PHM::PHM |
( |
PHM && |
| ) |
|
|
default |
virtual doci2DM::PHM::~PHM |
( |
| ) |
|
|
virtualdefault |
void PHM::constr_lists |
( |
int |
L | ) |
|
|
private |
template<class BlockType >
add the matrix matrix_pl times the constant alpha to this
- Parameters
-
alpha | the constant to multiply the matrix_pl with |
blockmat_pl | the BlockStructure to be multiplied by alpha and added to this |
Definition at line 172 of file BlockStructure.cpp.
template<class BlockType >
double BlockStructure::ddot |
( |
const BlockStructure< BlockType > & |
blocks_in | ) |
const |
|
inherited |
- Returns
- inproduct of (*this) blocks with blocks_in, defined as Tr (A B)
- Parameters
-
Definition at line 293 of file BlockStructure.cpp.
template<class BlockType >
void BlockStructure::dscal |
( |
double |
alpha | ) |
|
|
inherited |
Scale the blocks (*this) with parameter alpha
- Parameters
-
Definition at line 320 of file BlockStructure.cpp.
template<class BlockType >
void BlockStructure::fill_Random |
( |
| ) |
|
|
inherited |
template<class BlockType >
void BlockStructure::fill_Random |
( |
int |
seed | ) |
|
|
inherited |
void PHM::G |
( |
const TPM & |
tpm | ) |
|
Create the G condition from a TPM
- Parameters
-
Definition at line 230 of file PHM.cpp.
Build the full G matrix out of *this object
- Returns
- the full dense G matrix
Definition at line 296 of file PHM.cpp.
template<class BlockType >
int BlockStructure::gdeg |
( |
int |
i | ) |
const |
|
inherited |
template<class BlockType >
int BlockStructure::gdim |
( |
int |
i | ) |
const |
|
inherited |
const Matrix & PHM::getBlock |
( |
int |
a, |
|
|
int |
b |
|
) |
| const |
Get a 2x2 block of the G matrix, corresponding with indices a and b
- Parameters
-
a | the first sp index |
b | the second sp index |
- Returns
- the 2x2 matrix
Definition at line 203 of file PHM.cpp.
Matrix & PHM::getBlock |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
Get a 2x2 block of the G matrix, corresponding with indices a and b
- Parameters
-
a | the first sp index |
b | the second sp index |
- Returns
- the 2x2 matrix
Definition at line 218 of file PHM.cpp.
Build the G matrix using the full G matrix image
- Parameters
-
- Returns
- the full G matrix
Definition at line 262 of file PHM.cpp.
template<class BlockType >
int BlockStructure::gnr |
( |
| ) |
const |
|
inherited |
template<class BlockType >
Multiply symmetric blocks object left en right with symmetric blocks map to form another symmetric blocks and put it in (*this): this = map*object*map
- Parameters
-
Definition at line 367 of file BlockStructure.cpp.
template<class BlockType>
template<class BlockType>
template<class BlockType >
double PHM::operator() |
( |
int |
a, |
|
|
int |
b, |
|
|
int |
c, |
|
|
int |
d |
|
) |
| const |
The access operator for the G matrix. It's a bit complicated due to the fact that we don't store the full blown G matrix. We construct each element on the fly
- Parameters
-
a | the first sp index |
b | the second sp index |
c | the thirth sp index |
d | the fourth sp index |
- Returns
- the G matrix element
Definition at line 129 of file PHM.cpp.
template<class BlockType>
template<class BlockType>
template<class BlockType>
template<class BlockType>
template<class BlockType >
template<class BlockType >
overload the += operator for matrices
- Parameters
-
blockmat_pl | The matrix you want to add to this |
Definition at line 143 of file BlockStructure.cpp.
template<class BlockType >
overload the -= operator for matrices
- Parameters
-
blockmat_pl | The matrix you want to deduct from this |
Definition at line 157 of file BlockStructure.cpp.
template<class BlockType >
/= operator overloaded: divide by a constant
- Parameters
-
c | the number to divide your matrix through |
Definition at line 186 of file BlockStructure.cpp.
PHM& doci2DM::PHM::operator= |
( |
const PHM & |
| ) |
|
|
default |
PHM& doci2DM::PHM::operator= |
( |
PHM && |
| ) |
|
|
default |
template<class BlockType >
BlockType & BlockStructure::operator[] |
( |
int |
block | ) |
|
|
inherited |
[] overloaded, will return a reference to the block block in the blocks.
- Parameters
-
block | index of the block to be returned |
- Returns
- A reference to the Matrix object located on blocks[block].
Definition at line 91 of file BlockStructure.cpp.
template<class BlockType >
const BlockType & BlockStructure::operator[] |
( |
int |
block | ) |
const |
|
inherited |
[] overloaded, const version, will return a const reference to the block block in the blocks.
- Parameters
-
block | index of the block to be returned |
- Returns
- A reference to the Matrix object located on blocks[block].
Definition at line 102 of file BlockStructure.cpp.
void PHM::ReadFromFile |
( |
hid_t & |
group_id | ) |
|
Read a PHM object from a HDF5 group. The PHM object must already exist and have the correct dimensions. It will fill the object called on
- Parameters
-
group_id | reference to the HDF5 group to use |
Definition at line 499 of file PHM.cpp.
Use the 2x2 sep_pm for all the 2x2 blocks instead of the full blown sep_pm
- Parameters
-
pos | the positive part of the matrix |
neg | the negative part of the matrix |
Definition at line 343 of file PHM.cpp.
template<class BlockType >
template<class BlockType >
void BlockStructure::setDim |
( |
int |
block, |
|
|
int |
dim, |
|
|
int |
degeneracy |
|
) |
| |
|
inherited |
function that allocates the memory of the blocks block with dimension dim sets and the degeneracy of the matrix
- Parameters
-
block | the index of the block that will be allocated |
dim | the dimension of the particular block to be allocated |
degeneracy | the degeneracy of block "block" |
Definition at line 76 of file BlockStructure.cpp.
template<class BlockType>
void PHM::sqrt |
( |
int |
option | ) |
|
|
virtual |
Pull the sqrt out of this matrix. Optimized for the structure of the 2x2 matrices
- Parameters
-
option | 1 => positive sqrt, -1 => negative sqrt |
Reimplemented from doci2DM::BlockStructure< BlockType >.
Definition at line 357 of file PHM.cpp.
template<class BlockType >
void BlockStructure::symmetrize |
( |
| ) |
|
|
inherited |
template<class BlockType >
double BlockStructure::trace |
( |
| ) |
const |
|
inherited |
- Returns
- the trace of the matrix, each block matrix is weighed with its degeneracy.
Definition at line 277 of file BlockStructure.cpp.
void PHM::WriteFullToFile |
( |
hid_t & |
group_id | ) |
const |
void PHM::WriteToFile |
( |
hid_t & |
group_id | ) |
const |
Write a PHM object to a HDF5 group
- Parameters
-
group_id | reference to the HDF5 group to use |
Definition at line 388 of file PHM.cpp.
std::ostream& operator<< |
( |
std::ostream & |
output, |
|
|
doci2DM::PHM & |
phm |
|
) |
| |
|
friend |
table translating the block index to the single particle indices
Definition at line 108 of file PHM.h.
Definition at line 94 of file PHM.h.
Definition at line 96 of file PHM.h.
table translating two particles indices to single particle indices
Definition at line 102 of file PHM.h.
table translating single particles indices to the correct 2x2 block
Definition at line 105 of file PHM.h.
table translating single particles indices to two particle indices
Definition at line 99 of file PHM.h.
The documentation for this class was generated from the following files: