In one dimension the optimal coupling is always monotone: sort both samples and match in order. No linear program is needed, which is why this case is the building block for sliced Wasserstein.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Otws(V, V)
#> $W1
#> [1] 0
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "One-dimensional Wasserstein-1 distance"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
