ott.geometry.costs.CostFn.all_pairs#

CostFn.all_pairs(x, y)[source]#

Compute matrix of all costs (including norms) for vectors in x / y.

Parameters
  • x (ndarray) – [num_a, d] jnp.ndarray

  • y (ndarray) – [num_b, d] jnp.ndarray

Return type

ndarray

Returns

[num_a, num_b] matrix of cost evaluations.