towhee.models.vis4mer.utils.krylov

towhee.models.vis4mer.utils.krylov(l, a, b, c=None, return_power=False)[source]

Compute the Krylov matrix (b, ab, a^2b, …) using the squaring trick. If return_power=True, return A^{L-1} as well :param a: torch.tensor :type a: torch.tensor :param b: torch.tensor :type b: torch.tensor :param c: torch.tensor :type c: torch.tensor :param return_power: return_power :type return_power: bool