in hype/manifolds/lorentz.py [0:0]
def ptransp(self, x, y, v, ix=None, out=None):
"""Parallel transport for hyperboloid"""
if ix is not None:
v_ = v
x_ = x.index_select(0, ix)
y_ = y.index_select(0, ix)
elif v.is_sparse:
ix, v_ = v._indices().squeeze(), v._values()
x_ = x.index_select(0, ix)
y_ = y.index_select(0, ix)
else:
raise NotImplementedError
xy = self.ldot(x_, y_, keepdim=True).expand_as(x_)
vy = self.ldot(v_, y_, keepdim=True).expand_as(x_)
vnew = v_ + vy / (1 - xy) * (x_ + y_)
if out is None:
return vnew
else:
out.index_copy_(0, ix, vnew)