ott.problems.linear.linear_problem.LinearProblem.potential_fn_from_dual_vec#
- LinearProblem.potential_fn_from_dual_vec(fg, *, epsilon=None, axis)[source]#
Get potential function from a dual vector using the c-transform.
- Parameters:
fg (
Array) – Potential vector \(\mathbb{f}\) ifaxis = 0else \(\mathbb{g}\) of shape[n,]or[m,], respectively.epsilon (
Optional[float]) – Epsilon regularization. IfNone, use in thegeom.axis (
Literal[0,1]) – Ifaxis = 0, return the \(g\)-potential function, otherwise return the \(f\)-potential function.
- Return type:
- Returns:
The dual potential function.