Graphical optimization algorithms for computing the Earth Mover's distance on one-dimensional metric spaces.