quad.optim {RGeostats} | R Documentation |
This function performs the optimization of the quadratic form 1/2*x'Hx+g under linear equality constraints Ae*x = be and inequality constraints Ai*x >= bi.
quad.optim(h, g, ae = NA, be = NA, ai = NA, bi = NA, xinit = NA)
h |
A symetric positive definite numerical matrix |
g |
A numerical vector. |
ae |
A numerical matrix. |
be |
A numerical vector. |
ai |
A numerical matrix. |
bi |
A numerical vector. |
xinit |
An initial guess. It has to satisfied all the constraints. |
If dimension of h is n x n, g has to be a n vector, ae (resp. ai) has to be a ne x n (resp ni x n) matrix where ne (resp. ni) is the number of equality (resp. inequality) constraints, be (resp. bi) has to be a vector of size ne (resp. ni). xinit is of size n.
The value of the solution.
H=matrix(rnorm(9),3) H=H g = rnorm(3) quad.optim(H,g,t(c(1,1,1)),0,t(c(1,0,0)),0)