SyTen

◆ truncate()

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

Truncates the state.

See truncate_rec() for a detailed discussion of the algorithm.

Parameters
truncTruncation specification
dropNif true, drop the norm on both normalisation sweep
Returns
the total incurred error during truncations or NAN if the new state is 0

References drop_unmatched(), syten::isnan(), syten::BinaryTree::Tree< Cached< Tensor< 4 > > >::r, rnorm(), and truncate_rec().

Referenced by syten::BTT::RandomState::generateCompleteState(), syten::BTT::RandomState::generateNearVacuumState(), and truncateKeepNorm().

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