ott.core.initializers.SortingInitializer.init_dual_a#

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

Apply DualSort algorithm.

Parameters
  • ot_prob (LinearProblem) – OT problem.

  • lse_mode (bool) – Return potential if true, scaling if false.

  • init_f (Optional[ndarray]) – 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

ndarray

Returns

potential/scaling f_u, array of size n.