R/torch_qp_value.R

Defines functions torch_qp_value

#' @export
torch_qp_value<-function(x,
                         p,
                         Q)
{
  xt = torch_transpose_batch(x)
  0.5 * torch_quad_form_mat(x = x,mat = Q) + torch_matmul(xt,p)
}
adsb85/lqp documentation built on April 9, 2022, 12:35 a.m.