$$\bar{T}(x_i) = \frac{1}{a_i}\sum_j P_{ij} y_j$$ Peyre & Cuturi (2019), Remark 4.11, eq. (4.19).
Examples
Tm <- matrix(c(0.4, 0.1, 0.1, 0.4), 2) # a 2 x 2 coupling
Y <- matrix(c(0, 1, 0, 1), 2) # two destination points in the plane
Otbarmap(Tm, Y)
#> $estimate
#> [,1] [,2]
#> [1,] 0.2 0.2
#> [2,] 0.8 0.8
#>
#> $mass
#> [1] 0.5 0.5
#>
#> $displacement
#> [1] 0.32
#>
#> $method
#> [1] "Barycentric projection of a plan -- Peyre & Cuturi (2019) eq. (4.19)"
#>
