Optimization: principles and algorithms, by Michel Bierlaire
quadraticDirect.m
Go to the documentation of this file.
1 %> \file
2 %> Algorithm 9.1: Direct resolution of quadratic problems. Implementation of algorithm 9.1 of \cite Bier15-book
3 %>
4 %> @author <a href="http://people.epfl.ch/michel.bierlaire">Michel Bierlaire</a>
5 %> @date Fri Mar 20 11:03:31 2015
6 %> @ingroup Algorithms
7 %> @ingroup chap09
8 
9 %> @note Tested with \ref run0908quad.m
10 %> @note Called by \ref newtonLocalQuadratic
11 
12 %> Applies the direct resolution method to solve \f[\min_x \frac{1}{2} x^T Q x + b^T x\f] where \f$Q \in \mathbb{R}^n\times\mathbb{R}^n \f$ and \f$b \in \mathbb{R}^n\f$.
13 %> @param Q matrix of size \f$n \times n \f$.
14 %> @param b vector of size \f$n\f$.
15 %> @return solution: optimal solution
16 function solution = quadraticDirect(Q,b)
17  L = chol(Q)' ;
18  y = L \ (-b) ;
19  solution = L' \ y ;
20 endfunction
function newtonLocalQuadratic(in obj, in x0, in eps, in cg, in maxiter)
Applies local Newton algorithm to solve where is the gradient of the objective function.
function quadraticDirect(in Q, in b)
Applies the direct resolution method to solve where and .
Copyright 2015-2018 Michel Bierlaire