Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dcp2cone/canonicalizers/sigma_max_canon.R
#####
## CVXPY SOURCE: reductions/dcp2cone/canonicalizers/sigma_max_canon.py
## sigma_max(A) -> t subject to PSD([[t*I_n, A], [A^T, t*I_m]])
sigma_max_canon <- function(expr, args, solver_context = NULL) {
A <- args[[1L]]
n <- A@shape[1L]
m <- A@shape[2L]
t <- Variable()
## Build t*I_n and t*I_m using sparse identity matrices
## Must convert to dgCMatrix: Diagonal(n) is ddiMatrix -> as(,"generalMatrix") -> dgCMatrix
I_n <- as(Matrix::Diagonal(n), "generalMatrix")
I_m <- as(Matrix::Diagonal(m), "generalMatrix")
tI_n <- t * Constant(I_n)
tI_m <- t * Constant(I_m)
X <- bmat(list(list(tI_n, A), list(t(A), tI_m)))
constr <- list(PSD(X))
list(t, constr)
}
method(dcp_canonicalize, SigmaMax) <- sigma_max_canon
method(has_dcp_canon, SigmaMax) <- function(expr) TRUE
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.