SyTen

◆ invertDiagonal() [1/3]

template<typename Scalar >
void syten::invertDiagonal ( DenseTensor< 2, Scalar > &  a,
typename ScalarBase< Scalar >::type  scale 
)
inline

Approximately inverts the diagonal elements of a square matrix in place, leaving zeros untouched and using a Lorentzian broadening, i.e. replacing \( x_{i,i} \to \frac{x_{i,i}}{x_{i,i}^2 + \varepsilon} \) with \( \varepsilon \) equal to SYTEN_BROADENING_EPSILON times the supplied scale, which should be the magnitude of the overall largest inverted singular value.

References syten::DenseTensor< rank, Scalar >::dim(), scale(), SYTEN_ASSERT_DEBUG, and SYTEN_BROADENING_EPSILON.

Referenced by syten::Pyten::init_tensor(), syten::STensorImpl::invert_diagonal(), invertDiagonal(), pseudo_invert(), syten::MPS::DMRG::Worker::sync(), syten::MPS::TDVP::Worker::sync(), syten::MPS::DMRG::Worker::Worker(), and syten::MPS::TDVP::Worker::Worker().

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