Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dcp2cone/canonicalizers/quad/quad_form_canon.R
#####
## CVXPY SOURCE: reductions/dcp2cone/canonicalizers/quad/quad_form_canon.py
## If x is a Variable, wrap directly. Otherwise add equality constraint.
quad_form_quad_canon <- function(expr, args, solver_context = NULL) {
affine_expr <- args[[1L]]
P <- args[[2L]]
if (S7_inherits(affine_expr, Variable)) {
list(SymbolicQuadForm(affine_expr, P, expr), list())
} else {
t <- Variable(shape = affine_expr@shape)
list(SymbolicQuadForm(t, P, expr), list(affine_expr == t))
}
}
method(quad_canonicalize, QuadForm) <- quad_form_quad_canon
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.