ejoinings {kantorovich} | R Documentation |
Extreme joinings
Description
Return extreme joinings between mu
and nu
.
Usage
ejoinings(mu, nu, zeros = FALSE)
Arguments
mu |
(row margins) probability measure in numeric or bigq/character mode |
nu |
(column margins) probability measure in numeric or bigq/character mode |
zeros |
logical; in case when |
Value
A list containing the extreme joinings (matrices).
Examples
mu <- nu <- c(0.5, 0.5)
ejoinings(mu, nu)
# use exact arithmetic
library(gmp)
mu <- nu <- as.bigq(c(0.5,0.5))
ejoinings(mu, nu)
# different lengths example
mu <- setNames(as.bigq(c(1,2,4), 7), c("a", "b", "c"))
nu <- setNames(as.bigq(c(3,1), 4), c("b", "c"))
ejoinings(mu, nu)
[Package kantorovich version 3.2.0 Index]