VMPS++
Loading...
Searching...
No Matches
DmrgExternal.h File Reference
#include "symmetry/qarray.h"
Include dependency graph for DmrgExternal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  std::hash< std::array< int, N > >
 
struct  std::hash< std::array< qarray< Nq >, Nlegs > >
 
struct  std::hash< std::tuple< size_t, size_t, size_t, qarray< Nq >, qarray< Nq > > >
 
struct  std::hash< std::pair< qarray< Nq >, size_t > >
 
struct  std::hash< std::array< size_t, 2 > >
 
struct  std::hash< qarray< Nq > >
 

Namespaces

namespace  std
 

Macros

#define POSMOD_FUNCTION
 

Typedefs

typedef boost::rational< int > frac
 

Functions

template<int N>
int posmod (int x)
 
int posmod (int x, int N)
 
std::string print_frac_nice (frac r)
 
template<typename MatrixTypeA , typename MatrixTypeB >
size_t mult_cost (const MatrixTypeA &A, const MatrixTypeB &B)
 
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC >
std::vector< size_t > mult_cost (const MatrixTypeA &A, const MatrixTypeB &B, const MatrixTypeC &C)
 
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeD >
std::vector< size_t > mult_cost (const MatrixTypeA &A, const MatrixTypeB &B, const MatrixTypeC &C, const MatrixTypeD &D)
 
template<typename MatrixType >
void print_size (const MatrixType &M, string label)
 
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeR , typename Scalar >
void optimal_multiply (Scalar alpha, const MatrixTypeA &A, const MatrixTypeB &B, const MatrixTypeC &C, MatrixTypeR &result, bool DEBUG=false)
 
template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeD , typename MatrixTypeR , typename Scalar >
void optimal_multiply (Scalar alpha, const MatrixTypeA &A, const MatrixTypeB &B, const MatrixTypeC &C, const MatrixTypeD &D, MatrixTypeR &result, bool DEBUG=false)
 
double stagger (int i)
 
template<typename Scalar >
Scalar localSumTrivial (int i)
 
double calc_S_from_SSp1 (double x)
 
int closest_int (double x, int min, int max)
 

Macro Definition Documentation

◆ POSMOD_FUNCTION

#define POSMOD_FUNCTION

Calculates mod N ensuring the result is positive for positive N

Definition at line 18 of file DmrgExternal.h.

Typedef Documentation

◆ frac

typedef boost::rational<int> frac

Definition at line 11 of file DmrgExternal.h.

Function Documentation

◆ calc_S_from_SSp1()

double calc_S_from_SSp1 ( double  x)

Solves the quadratic equation Stot*(Stot+1) = x, where x is obtained numerically and Stot is required

Definition at line 283 of file DmrgExternal.h.

◆ closest_int()

int closest_int ( double  x,
int  min,
int  max 
)

Definition at line 288 of file DmrgExternal.h.

◆ localSumTrivial()

template<typename Scalar >
Scalar localSumTrivial ( int  i)

Dummy weight function for sums of local operators.

Definition at line 275 of file DmrgExternal.h.

◆ mult_cost() [1/3]

template<typename MatrixTypeA , typename MatrixTypeB >
size_t mult_cost ( const MatrixTypeA &  A,
const MatrixTypeB &  B 
)

Cost to multiply 2 matrices.

Definition at line 142 of file DmrgExternal.h.

◆ mult_cost() [2/3]

template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC >
std::vector< size_t > mult_cost ( const MatrixTypeA &  A,
const MatrixTypeB &  B,
const MatrixTypeC &  C 
)

Cost to multiply 3 matrices in 2 possible ways.

Definition at line 149 of file DmrgExternal.h.

◆ mult_cost() [3/3]

template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeD >
std::vector< size_t > mult_cost ( const MatrixTypeA &  A,
const MatrixTypeB &  B,
const MatrixTypeC &  C,
const MatrixTypeD &  D 
)

Cost to multiply 4 matrices in 5 possible ways.

Definition at line 163 of file DmrgExternal.h.

◆ optimal_multiply() [1/2]

template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeD , typename MatrixTypeR , typename Scalar >
void optimal_multiply ( Scalar  alpha,
const MatrixTypeA &  A,
const MatrixTypeB &  B,
const MatrixTypeC &  C,
const MatrixTypeD &  D,
MatrixTypeR &  result,
bool  DEBUG = false 
)

Multiplies 4 matrices by using the optimal order of operations.

Definition at line 219 of file DmrgExternal.h.

◆ optimal_multiply() [2/2]

template<typename MatrixTypeA , typename MatrixTypeB , typename MatrixTypeC , typename MatrixTypeR , typename Scalar >
void optimal_multiply ( Scalar  alpha,
const MatrixTypeA &  A,
const MatrixTypeB &  B,
const MatrixTypeC &  C,
MatrixTypeR &  result,
bool  DEBUG = false 
)

Multiplies 3 matrices by using the optimal order of operations.

Definition at line 191 of file DmrgExternal.h.

◆ posmod() [1/2]

template<int N>
int posmod ( int  x)
inline

Definition at line 20 of file DmrgExternal.h.

◆ posmod() [2/2]

int posmod ( int  x,
int  N 
)
inline

Definition at line 25 of file DmrgExternal.h.

◆ print_frac_nice()

std::string print_frac_nice ( frac  r)

Prints a boost fraction in such a way, that a "1" in the denominator is omitted.

Definition at line 32 of file DmrgExternal.h.

◆ print_size()

template<typename MatrixType >
void print_size ( const MatrixType &  M,
string  label 
)
inline

Definition at line 184 of file DmrgExternal.h.

◆ stagger()

double stagger ( int  i)
inline

Function to realize staggered fields.

Definition at line 268 of file DmrgExternal.h.