R/208_reductions_dgp2dcp_canonicalizers_norm_inf_canon.R

Defines functions .dgp_norm_inf_canon

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

## CVXPY SOURCE: reductions/dgp2dcp/canonicalizers/norm_inf_canon.py
## DGP canonicalizer for NormInf: ||x||_inf -> max(x)
## Since args are positive, ||x||_inf = max(x_i).
## Delegates to max_canon directly.

.dgp_norm_inf_canon <- function(expr, args) {
  ## Create a MaxEntries expression and delegate to its canonicalizer
  tmp <- max_entries(args[[1L]], axis = expr@axis, keepdims = expr@keepdims)
  max_canon(tmp, tmp@args)
}

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.