powered by
Calculate the transport plan obtained by the north-west-corner rule.
north_west_corner(wx, wy, threshold = 1e-15)
a matrix representing the transport plan obtained by the north-west-corner rule.
first weight vector.
second weight vector.
small value that indicates when a value is considered to be zero.
set.seed(1) wx <- rep(1/5, 5) wy <- runif(6) wy <- wy / sum(wy) north_west_corner(wx, wy)
Run the code above in your browser using DataLab