SyTen
syten::Truncation Struct Reference

Truncation specification. More...

#include <truncation.h>

+ Inheritance diagram for syten::Truncation:
+ Collaboration diagram for syten::Truncation:

Public Member Functions

bool notTruncating () const
 Returns true if *this corresponds to no truncation, i.e. More...
 
template<typename Truncatable >
SRDef operator() (Truncatable &&s) const
 Calls truncateKeepNorm() on the passed argument with *this as an argument. More...
 
bool operator== (Truncation const &other) const
 Returns true if *this is exactly equal to other More...
 
bool operator> (Truncation const &other) const
 Returns true if any parameter of *this defines a stronger truncation (resulting in a potentially smaller state space) than the corresponding operator in other. More...
 
void scale (SRDef const norm)
 Scales *this to be correct for a tensor of norm n as opposed to norm 1. More...
 
Truncation scaled (SRDef const norm) const
 Copies *this, scales the copy to be correct for a tensor of norm n and returns the scaled object. More...
 
template<typename Archive >
void serialize (Archive &ar, unsigned int const in_version)
 Boost serialisation. More...
 
 Truncation (SRDef const threshold_=-1, Index const maxStates_=Maximum(), Index const maxBlocksize_=Maximum(), SRDef const weight_=-1)
 Standard ctor, works with 0 through 3 arguments. More...
 

Public Attributes

Index maxBlocksize {Maximum()}
 maximal blocksize of each dense block More...
 
Index maxStates {Maximum()}
 maximal number of states to keep More...
 
SRDef threshold {-1}
 Singular value threshold. More...
 
bool truncate_to_convergence {false}
 If true, truncate repeatedly until the bond dimension no longer changes. More...
 
SRDef weight {-1}
 Maximal discarded weight, given by \( \sum_{\mathrm{disc}} s_i^2 \). More...
 

Static Public Attributes

static constexpr unsigned int version = 2
 Boost serialisation version. More...
 

Detailed Description

Truncation specification.

Ideally, all functions implementing truncation of some sort should provide at least an overload to accept such a struct.

Only a default-constructed or equivalent object corresponds to no truncation to take place.


The documentation for this struct was generated from the following files: