Cumulative maximum as used in simple regrets
M = cummax(R)
Copyright © by Emile Contal, 2015. Published under the GNU GPLv3 licence