def rsdl_rn(self, AX, Y):
"""Compute primal residual normalisation term."""
# The primal residual normalisation term is
# max( ||A x^(k)||_2, ||B y^(k)||_2 ) and B = -(I I I ...)^T.
# The scaling by sqrt(Nb) of the l2 norm of Y accounts for the
# block replication introduced by multiplication by B
return max((linalg.norm(AX), np.sqrt(self.Nb)*linalg.norm(Y)))
评论列表
文章目录