Source: http://irma.math.unistra.fr/~privat/documents/mainOptimisation.pdf