Efficient computation of an isotonic median regression