- EntropicPotentials.transport(vec, forward=True)#
vecaccording to Brenier formula [Brenier, 1991].
Uses Theorem 1.17 from [Santambrogio, 2015] to compute an OT map when given the Legendre transform of the dual potentials.
That OT map can be recovered as \(x- (\nabla h^*)\circ \nabla f(x)\), where \(h^*\) is the Legendre transform of \(h\). For instance, in the case \(h(\cdot) = \|\cdot\|^2, \nabla h(\cdot) = 2 \cdot\,\), one has \(h^*(\cdot) = \|.\|^2 / 4\), and therefore \(\nabla h^*(\cdot) = 0.5 \cdot\,\).
When the dual potentials are solved in correlation form (only in the Sq. Euclidean distance case), the maps are \(\nabla g\) for forward, \(\nabla f\) for backward.