VMPS++
|
Tensor with two legs and quantum number blocks. One could have used a general tensor, but the special case of two legs is hardcoded to preserve the sanity of the programmer. For the general tensor see Multipede.
Symmetry | : A class providing all relevant functions and infos that are determined by the Symmetry. Click here for more information. |
MatrixType | : MatrixXd or MatrixXcd |
#include <Biped.h>
Public Types | |
typedef MatrixType_ | MatrixType |
Public Member Functions | |
Biped () | |
std::string | formatted () const |
std::string | print (const bool SHOW_MATRICES=false, const std::size_t precision=3) const |
std::string | print_dict () const |
double | memory (MEMUNIT memunit=GB) const |
double | overhead (MEMUNIT memunit=MB) const |
Scalar | trace () const |
template<typename expScalar > | |
Biped< Symmetry, MatrixType_ > | exp (const expScalar x) const |
template<typename OtherMatrixType > | |
void | outerResize (const Biped< Symmetry, OtherMatrixType > Brhs) |
template<typename OtherMatrixType > | |
Biped< Symmetry, OtherMatrixType > | cast () const |
void | shift_Qin (const qarray< Symmetry::Nq > &Q) |
void | clear () |
void | setZero () |
void | setRandom () |
void | setVacuum () |
void | setTarget (qType Qtot) |
void | setTarget (vector< qType > Qmulti) |
void | setIdentity (const Qbasis< Symmetry > &base1, const Qbasis< Symmetry > &base2, qType Q=Symmetry::qvacuum()) |
void | setRandom (const Qbasis< Symmetry > &base1, const Qbasis< Symmetry > &base2, qType Q=Symmetry::qvacuum()) |
void | setZero (const Qbasis< Symmetry > &base1, const Qbasis< Symmetry > &base2, qType Q=Symmetry::qvacuum()) |
Biped< Symmetry, MatrixType_ > | cleaned () const |
Biped< Symmetry, MatrixType_ > | sorted () const |
Biped< Symmetry, MatrixType_ > | adjoint () const |
Biped< Symmetry, MatrixType_ > | transpose () const |
Biped< Symmetry, MatrixType_ > | conjugate () const |
Biped< Symmetry, MatrixType_ > | adjustQN (const size_t number_cells) |
void | cholesky (Biped< Symmetry, MatrixType > &res) const |
template<typename EpsScalar > | |
tuple< Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ > > | truncateSVD (size_t minKeep, size_t maxKeep, EpsScalar eps_svd, double &truncWeight, double &entropy, map< qarray< Symmetry::Nq >, Eigen::ArrayXd > &SVspec, bool PRESERVE_MULTIPLETS=true, bool RETURN_SPEC=true) const |
template<typename EpsScalar > | |
tuple< Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ > > | truncateSVD (size_t minKeep, size_t maxKeep, EpsScalar eps_svd, double &truncWeight, bool PRESERVE_MULTIPLETS=true) const |
pair< Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ > > | QR (bool RETURN_LQ=false, bool MAKE_UNIQUE=false) const |
Biped< Symmetry, MatrixType_ > & | operator+= (const Biped< Symmetry, MatrixType_ > &Arhs) |
void | addScale (const Scalar &factor, const Biped< Symmetry, MatrixType_ > &Mrhs, BLOCK_POSITION BP=SAME_PLACE) |
void | addScale_extend (const Scalar &factor, const Biped< Symmetry, MatrixType_ > &Mrhs) |
Biped< Symmetry, MatrixType_ > | contract (const Biped< Symmetry, MatrixType_ > &A, const contract::MODE MODE=contract::MODE::UNITY) const |
void | push_back (qType qin, qType qout, const MatrixType_ &M) |
void | push_back (std::array< qType, 2 > quple, const MatrixType_ &M) |
void | try_push_back (std::array< qType, 2 > quple, const MatrixType_ &M) |
void | try_push_back (qType qin, qType qout, const MatrixType_ &M) |
void | create_block (std::array< qType, 2 > quple) |
void | try_create_block (std::array< qType, 2 > quple) |
Private Types | |
typedef Symmetry::qType | qType |
typedef Eigen::Index | Index |
typedef MatrixType_::Scalar | Scalar |
std::size_t | dim |
std::vector< qType > | in |
std::vector< qType > | out |
std::vector< MatrixType_ > | block |
std::size_t | size () const |
void | plusplus () |
std::unordered_map< std::array< qType, 2 >, std::size_t > | dict |
Eigen::VectorXi | rows (bool FULL=false) const |
Eigen::VectorXi | cols (bool FULL=false) const |
double | operatorNorm (bool COLWISE=true) const |
double | norm () const |
Eigen::VectorXd | squaredNorm () const |
|
private |
typedef MatrixType_ Biped< Symmetry, MatrixType_ >::MatrixType |
|
private |
|
private |
void Biped< Symmetry, MatrixType_ >::addScale | ( | const Scalar & | factor, |
const Biped< Symmetry, MatrixType_ > & | Mrhs, | ||
BLOCK_POSITION | POS = SAME_PLACE |
||
) |
Biped< Symmetry, MatrixType_ > Biped< Symmetry, MatrixType_ >::adjustQN | ( | const size_t | number_cells | ) |
This functions transforms all quantum numbers in Biped::in and Biped::out by . It is used for avg(Umps V, Mpo O, Umps V) in VumpsLinearAlgebra.h when O.length() > V.length(). In this case the quantum numbers in the Bipeds are transformed in correspondence with V.length() and this is incompatible with the quantum numbers in O.length() which are transformed in correspondence to O.length().
number_cells | : |
void Biped< Symmetry, MatrixType_ >::cholesky | ( | Biped< Symmetry, MatrixType > & | res | ) | const |
void Biped< Symmetry, MatrixType_ >::clear |
Eigen::VectorXi Biped< Symmetry, MatrixType_ >::cols | ( | bool | FULL = false | ) | const |
Biped< Symmetry, MatrixType_ > Biped< Symmetry, MatrixType_ >::contract | ( | const Biped< Symmetry, MatrixType_ > & | A, |
const contract::MODE | MODE = contract::MODE::UNITY |
||
) | const |
std::string Biped< Symmetry, MatrixType_ >::formatted |
double Biped< Symmetry, MatrixType_ >::memory | ( | MEMUNIT | memunit = GB | ) | const |
double Biped< Symmetry, MatrixType_ >::norm |
Returns the total Frobenius norm of the Biped. This is equivalent to std::sqrt(squaredNorm().sum()).
double Biped< Symmetry, MatrixType_ >::operatorNorm | ( | bool | COLWISE = true | ) | const |
double Biped< Symmetry, MatrixType_ >::overhead | ( | MEMUNIT | memunit = MB | ) | const |
|
inline |
std::string Biped< Symmetry, MatrixType_ >::print | ( | const bool | SHOW_MATRICES = false , |
const std::size_t | precision = 3 |
||
) | const |
string Biped< Symmetry, MatrixType_ >::print_dict |
Prints Biped<Symmetry,MatrixType>::dict into a string.
Eigen::VectorXi Biped< Symmetry, MatrixType_ >::rows | ( | bool | FULL = false | ) | const |
void Biped< Symmetry, MatrixType_ >::setRandom |
Sets all matrices in Biped<Symmetry,MatrixType>::block to random values, preserving the rows and columns.
void Biped< Symmetry, MatrixType_ >::setVacuum |
void Biped< Symmetry, MatrixType_ >::setZero |
Sets all matrices in Biped<Symmetry,MatrixType>::block to zero, preserving the rows and columns.
|
inline |
Eigen::VectorXd Biped< Symmetry, MatrixType_ >::squaredNorm |
MatrixType_::Scalar Biped< Symmetry, MatrixType_ >::trace |
|
inline |
tuple< Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ >, Biped< Symmetry, MatrixType_ > > Biped< Symmetry, MatrixType_ >::truncateSVD | ( | size_t | minKeep, |
size_t | maxKeep, | ||
EpsScalar | eps_svd, | ||
double & | truncWeight, | ||
double & | entropy, | ||
map< qarray< Symmetry::Nq >, Eigen::ArrayXd > & | SVspec, | ||
bool | PRESERVE_MULTIPLETS = true , |
||
bool | RETURN_SPEC = true |
||
) | const |
std::vector<MatrixType_> Biped< Symmetry, MatrixType_ >::block |
std::size_t Biped< Symmetry, MatrixType_ >::dim |