@@ -506,7 +506,27 @@ function sinkhorn_barycenter(
506506 return u_all[1 , :] .* (K_all[1 ] * v_all[1 , :])
507507end
508508
509- function ot_reg_plan (mu, nu, C, eps; reg_func = " L2" , method = " lorenz" , kwargs... )
509+ """
510+ ot_reg_plan(mu, nu, C, eps; reg_func = "L2", method = "lorenz", kwargs...)
511+
512+ Compute the optimal transport plan between `mu` and `nu` for optimal transport with a
513+ general choice of regulariser `math Ω(γ)`. Solves for `gamma` that minimises
514+
515+ ```math
516+ \\ inf_{γ ∈ Π(μ, ν)} \\ langle γ, C \\ rangle + ε Ω(γ)
517+ ```
518+
519+ Supported choices of `math Ω` are:
520+ - L2: `math Ω(γ) = \\ frac{1}{2} \\ | γ \\ |_2^2`, `reg_func = "L2"`
521+
522+ Supported solution methods are:
523+ - L2: `method = "lorenz"` for the semi-smooth Newton method of Lorenz et al.
524+
525+ References
526+
527+ Lorenz, D.A., Manns, P. and Meyer, C., 2019. Quadratically regularized optimal transport. Applied Mathematics & Optimization, pp.1-31.
528+ """
529+ function ot_reg_plan (mu, nu, C, eps; reg_func= " L2" , method= " lorenz" , kwargs... )
510530 if (reg_func == " L2" ) && (method == " lorenz" )
511531 return quadreg (mu, nu, C, eps; kwargs... )
512532 else
0 commit comments