The dual turns a search over couplings into a search over two functions on the marginals. Any feasible pair gives a lower bound on the transport cost, so this is the optimum only when the potentials are. Feasibility against a cost matrix is not checked.
Examples
Ototk(a = c(1, 2, 3, 4, 5, 6, 7, 8), b = 5L, f = c(1, 2, 3, 4, 5, 6, 7, 8),
g = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $dual_val
#> [1] 384
#>
#> $estimate
#> [1] 384
#>
#> $n
#> [1] 8
#>
#> $m
#> [1] 1
#>
#> $method
#> [1] "Kantorovich dual objective value"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
