Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/constraints/cones.R
#####
## CVXPY SOURCE: constraints/cones.py
## Cone -- base class for all conic constraints
##
## A thin subclass of Constraint that provides:
## - dual_cone() -- abstract, must be overridden by subclasses
## - dual_residual() -- computed from dual_cone + residual
Cone <- new_class("Cone", parent = Constraint, package = "CVXR")
# -- dual_cone: abstract on Cone ----------------------------------
## CVXPY SOURCE: cones.py lines 44-56 -- _dual_cone (raises NotImplementedError)
method(dual_cone, Cone) <- function(x, ...) {
cli_abort("{.fn dual_cone} not implemented for {.cls {class(x)[[1L]]}}.")
}
# -- dual_residual ------------------------------------------------
## CVXPY SOURCE: cones.py lines 58-67 -- dual_residual property
## Calls _dual_cone with dual variables, then returns residual of that cone.
method(dual_residual, Cone) <- function(x) {
dc <- do.call(dual_cone, c(list(x), x@dual_variables))
residual(dc)
}
# -- print --------------------------------------------------------
method(print, Cone) <- function(x, ...) {
cat(expr_name(x), "\n")
invisible(x)
}
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.