SyTen

◆ restrict()

std::int64_t syten::restrict ( std::int64_t  value,
std::int64_t  max 
)

Restricts value into the range [0,max), mapping -1 to max-1.

Remarks
No, this is not simply value % max (as it would be in e.g. Python).

References max().

Referenced by syten::IPEPS::FullCTM::br(), syten::IPEPS::expectation(), syten::IPEPS::horz2_norm(), syten::IPEPS::FullCTM::lr(), syten::ArrayImpl::Array< T, Sz >::operator()(), syten::Vec< T >::operator()(), syten::SpanImpl::MutSpan< T >::operator()(), syten::SpanImpl::ConstSpan< T >::operator()(), syten::IPEPS::FullCTM::rr(), syten::IPEPS::Vert2CTM::setup(), syten::IPEPS::Horz2CTM::setup(), syten::IPEPS::FullCTM::tr(), syten::IPEPS::vert2_norm(), syten::IPEPS::vert2r_norm(), syten::IPEPS::FullUpdate::vertical(), syten::IPEPS::vertical_simple_update(), and syten::IPEPS::vertical_simple_update_remover().

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