SyTen

◆ truncate()

SRDef syten::T3N::State::truncate ( Truncation const &  trunc = Truncation(),
State::DropNorm const  dropN = DropNorm::Yes,
bool const  correct_cgcs = true 
)

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 syten::correct_cgc_tensors(), and std::isnan().

+ Here is the call graph for this function: