Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/complex2real/canonicalizers/psd_canon.R
#####
## CVXPY SOURCE: reductions/complex2real/canonicalizers/psd_canon.py
## PSD constraint: [[Re, -Im], [Im, Re]] >> 0
## CVXPY v1.9.3 fix: #3342 -- the block construction is factored out so that
## Complex2Real can re-impose PSD/NSD on a complex Variable carrying that
## attribute (psd_canon.py:22-29).
complex_psd_matrix <- function(real_part, imag_part) {
if (is.null(imag_part)) {
return(real_part)
}
if (is.null(real_part)) {
real_part <- Constant(matrix(0, .shape(imag_part)[1L], .shape(imag_part)[2L]))
}
bmat(list(
list(real_part, -imag_part),
list(imag_part, real_part)
))
}
c2r_psd_canon <- function(expr, real_args, imag_args, real2imag) {
mat <- complex_psd_matrix(real_args[[1L]], imag_args[[1L]])
list(list(expr_copy(expr, list(mat))), NULL)
}
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.