ott.initializers.linear.initializers.SortingInitializer.init_dual_a

ott.initializers.linear.initializers.SortingInitializer.init_dual_a#

SortingInitializer.init_dual_a(ot_prob, lse_mode, rng=None, init_f=None)[source]#

Apply DualSort algorithm.

Parameters:
  • ot_prob (LinearProblem) – OT problem between discrete distributions.

  • lse_mode (bool) – Return potential if True, scaling if False.

  • rng (Optional[Array]) – Random number generator for stochastic initializers, unused.

  • init_f (Optional[Array]) – potential f, array of size [n,]. This is the starting potential, which is then updated to make the init potential, so an init of an init.

Return type:

Array

Returns:

potential/scaling f_u, array of size [n,].