# ott.geometry.costs.SqEuclidean#

class ott.geometry.costs.SqEuclidean[source]#

Squared Euclidean distance.

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) Output barycenter of vectors when using squared-Euclidean distance. h(z) TI function acting on difference of $$x-y$$ to output cost. Legendre transform of h() when it is convex. Compute squared Euclidean norm for vector. pairwise(x, y) Compute minus twice the dot-product between vectors.