Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dgp2dcp/canonicalizers/quad_over_lin_canon.R
#####
## CVXPY SOURCE: reductions/dgp2dcp/canonicalizers/quad_over_lin_canon.py
## DGP canonicalizer for QuadOverLin: ||x||_2^2 / y
## In log-space: log(||x||^2/y) = log(sum(x_i^2)) - log(y)
## = log_sum_exp(2*log(x_i)) - log(y)
## Args are already in log-space, so: add_canon(explicit_sum(2*x)) - y
.dgp_quad_over_lin_canon <- function(expr, args) {
summed <- .dgp_explicit_sum(2 * args[[1L]])
numerator_result <- .dgp_add_canon(summed, summed@args)
numerator <- numerator_result[[1L]]
result <- numerator - args[[2L]]
list(result, list())
}
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.