CheMPS2
|
#include <Tensor.h>
Public Member Functions | |
virtual int | gNKappa () const =0 |
Get the number of tensor blocks. More... | |
virtual double * | gStorage ()=0 |
Get the pointer to the storage. More... | |
virtual int | gKappa (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2) const =0 |
Get the index corresponding to a certain tensor block. More... | |
virtual int | gKappa2index (const int kappa) const =0 |
Get the storage jump corresponding to a certain tensor block. More... | |
virtual double * | gStorage (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2)=0 |
Get the pointer to the storage of a certain tensor block. More... | |
virtual int | gIndex () const =0 |
Get the location index. More... | |
Protected Attributes | |
int | index |
Index of the Tensor object. For TensorT: a site index; for other tensors: a boundary index. | |
double * | storage |
The actual variables. Tensor block kappa begins at storage+kappa2index[kappa] and ends at storage+kappa2index[kappa+1]. | |
int | nKappa |
Number of Tensor blocks. | |
int * | kappa2index |
kappa2index[kappa] indicates the start of tensor block kappa in storage. kappa2index[nKappa] gives the size of storage. | |
Pure virtual Tensor class.
The Tensor class defines parameters and functions which all Tensors must have.
|
pure virtual |
Get the location index.
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.
|
pure virtual |
Get the index corresponding to a certain tensor block.
N1 | The left or up particle number sector |
TwoS1 | The left or up spin symmetry sector |
I1 | The left or up irrep sector |
N2 | The right or down particle number sector |
TwoS2 | The right or down spin symmetry sector |
I2 | The right or down irrep sector |
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.
|
pure virtual |
Get the storage jump corresponding to a certain tensor block.
kappa | The symmetry block |
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.
|
pure virtual |
Get the number of tensor blocks.
return The number of tensor blocks
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.
|
pure virtual |
Get the pointer to the storage.
return pointer to the storage
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.
|
pure virtual |
Get the pointer to the storage of a certain tensor block.
N1 | The left or up particle number sector |
TwoS1 | The left or up spin symmetry sector |
I1 | The left or up irrep sector |
N2 | The right or down particle number sector |
TwoS2 | The right or down spin symmetry sector |
I2 | The right or down irrep sector |
Implemented in CheMPS2::TensorOperator, and CheMPS2::TensorT.