ott.geometry.costs.Euclidean
ott.geometry.costs.Euclidean#
- class ott.geometry.costs.Euclidean[source]#
Squared Euclidean distance CostFn.
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)Output barycenter of vectors when using squared-Euclidean distance.
norm
(x)Compute squared Euclidean norm for vector.
pairwise
(x, y)Compute minus twice the dot-product between vectors.