# ott.geometry.costs.SqPNorm#

class ott.geometry.costs.SqPNorm(p)[source]#

Squared p-norm of the difference of two vectors.

For details on the derivation of the Legendre transform of the norm, see e.g. the reference , p.93/94.

Parameters

p (float) – Power of the p-norm.

Methods

 all_pairs(x, y) Compute matrix of all costs (including norms) for vectors in x / y. Compute matrix of all pairwise-costs (no norms) for vectors in x / y. barycenter(weights, xs) Barycentric operator. h(z) TI function acting on difference of $$x-y$$ to output cost. Legendre transform of h() when it is convex. pairwise(x, y) Compute cost as evaluation of h() on $$x-y$$.

Attributes