multi_marginal: Solve the multimarginal optimal transport problem by linear programming
Description
Solves the N-fold multimarginal optimal transport problem between N specified measures and a specified cost. This is essentially a convenient wrapper function that builds and solves the corresponding linear program.
Usage
multi_marginal(weights, costA)
Arguments
weights
A list of vectors specifying the weights of the marginal distributions. These vectors do not need to be of the same size.
costA
An array where the entry (i1,i2,...,iN) specifies the value of the cost functional for the point i1 in the first measure, i2 in the second measure
and so on.
Value
A list with two entries. The first entry contains the optimal multicoupling in array form, and the second entry contains
the cost of the optimal solution.