Description Usage Arguments Value Examples
View source: R/multimarginal_LP.R
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.
1 | multi_marginal(weights, costA)
|
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. |
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.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.