SyTen

◆ truncate()

SRDef syten::MPS::State::truncate ( Truncation const &  trunc = Truncation(),
State::DropNorm const  dropN = DropNorm::Yes 
)

Truncates the state.

First drops all unmatched blocks, then left-normalises the state without truncation and finally right-normalises with the given truncation.

Parameters
truncTruncation specification
dropNif true, drop the norm on both normalisation sweep
Returns
the total incurred error during truncations

References dropUnmatched(), leftnorm(), and rightnorm().

Referenced by syten::MPS::RandomState::generateCompleteState(), syten::MPS::RandomState::generateSampledState(), syten::Pyten::init_mps(), and truncateKeepNorm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: