def _one_over_lipschitzS(self, Xs):
    (A, S) = Xs
    if (self.WA is 1):
        return (1.0 / utils.get_spectral_norm(A))
    else:
        import scipy.sparse
        N = S.shape[1]
        As = scipy.sparse.bmat([[(scipy.sparse.identity(N) * A[(b, k)]) for k in range(A.shape[1])] for b in range(A.shape[0])])
        ASigma_1A = As.T.dot(self.WS.dot(As))
        LS = np.real(scipy.sparse.linalg.eigs(ASigma_1A, k=1, return_eigenvectors=False)[0])
        return (1.0 / LS)
def _one_over_lipschitzS(self, Xs):
    (A, S) = Xs
    if (self.WA is 1):
        return (1.0 / utils.get_spectral_norm(A))
    else:
        import scipy.sparse
        N = S.shape[1]
        As = scipy.sparse.bmat([[(scipy.sparse.identity(N) * A[(b, k)]) for k in range(A.shape[1])] for b in range(A.shape[0])])
        ASigma_1A = As.T.dot(self.WS.dot(As))
        LS = np.real(scipy.sparse.linalg.eigs(ASigma_1A, k=1, return_eigenvectors=False)[0])
        return (1.0 / LS)