ott.solvers.linear.univariate.north_west_solver

ott.solvers.linear.univariate.north_west_solver#

ott.solvers.linear.univariate.north_west_solver(prob)[source]#

Univariate solver that implements the north-west corner rule.

This rule is described in [Peyré and Cuturi, 2019], sec. 3.4.2 and the dual variables are stored as described in [Sejourne et al., 2022], alg. 3.

Parameters:

prob (LinearProblem) – Problem with two point clouds of shapes [n, d] and [m, d] and a ground cost. The [n,] and [m,] sized probability weights are stored in attributes a and b.

Return type:

UnivariateOutput

Returns:

The univariate output. Note that the mass_paired_indices can be \(0\) in some entries, but always sums to \(1\) for each of the \(d\) slices.