Changed to optimized transport matrix computation