ott.geometry.costs.PNormP
ott.geometry.costs.PNormP#
- class ott.geometry.costs.PNormP(p)[source]#
p-norm to the power p (and divided by p) of the difference of two vectors.
- Parameters
p (
float
) – Power of the p-norm, a finite float larger than 1.0.
Methods
all_pairs
(x, y)Compute matrix of all costs (including norms) for vectors in x / y.
all_pairs_pairwise
(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.
h_legendre
(z)Legendre transform of
h()
when it is convex.pairwise
(x, y)Compute cost as evaluation of
h()
on \(x-y\).Attributes