R/217_reductions_dgp2dcp_canonicalizers_gmatmul_canon.R

Defines functions .dgp_gmatmul_canon

#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dgp2dcp/canonicalizers/gmatmul_canon.R
#####

## CVXPY SOURCE: reductions/dgp2dcp/canonicalizers/gmatmul_canon.py
## DGP canonicalizer for Gmatmul: A o X -> A %*% log(X) in log-space
## Since args[[1]] is already log(X), this is just A %*% args[[1]]

.dgp_gmatmul_canon <- function(expr, args) {
  list(expr@A %*% args[[1L]], list())
}

Try the CVXR package in your browser

Any scripts or data that you put into this service are public.

CVXR documentation built on March 6, 2026, 9:10 a.m.