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.

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.

h(z)

TI function acting on difference of \(x-y\) to output cost.

h_legendre(z)

Legendre transform of h() when it is convex.

norm(x)

Compute squared Euclidean norm for vector.

pairwise(x, y)

Compute minus twice the dot-product between vectors.