demo/QPUC.R

##
## Demo for solving an unconstrained QP
##
## Creating objects for QP
n <- 4L
M <- matrix(rnorm(n^2), nrow = n, ncol = n)
P <- crossprod(M)
q <- rnorm(n)
## Solving QP
ans <- cccp(P = P, q = q)
ans
getx(ans)

Try the cccp package in your browser

Any scripts or data that you put into this service are public.

cccp documentation built on Sept. 10, 2022, 1:06 a.m.