SyTen

◆ hadamard_inv_diffdiff()

STensor syten::STensorImpl::hadamard_inv_diffdiff ( STensor const &  s,
STensor  x,
SBasisId const &  j_basis,
SBasisId const &  i_basis,
bool  minus 
)

Given a diagonal square tensor s and a square tensor x, approximates \( x_i^j \left( \frac{1}{s_j - s_i} \pm \frac{1}{s_j + s_i} \right) \).

Parameters
sdiagonal input tensor whose diagonal differences are inverted
xinput tensor of which the Hadamard product is taken
j_basisID of the basis taken as the minuend in the difference
i_basisID of the basis taken as the subtrahend in the difference
minusif true, select - in ±, if false, select +
Remarks
This function is necessary for the autodifferentiation of an SVD.
This function is not autodifferentiable.

References syten::STensorImpl::STensor::autodiff_enabled(), syten::STensorImpl::STensor::bi(), syten::STensorImpl::STensor::get(), SYTEN_ASSERT, SYTEN_ASSERT_MSG, and SYTEN_BROADENING_EPSILON.

Referenced by syten::STensorImpl::Autodiff::svd_adjoint_evaluator().

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