Source: https://www.math.univ-paris13.fr/~halpern/teaching/optim.pdf