delta: Access the perturbation 'delta' of a Variable or Parameter

View source: R/304_zzz_R_specific_grad_delta_attrs.R

deltaR Documentation

Access the perturbation delta of a Variable or Parameter

Description

Used by psolve() with requires_grad = TRUE and Problem$derivative(). On a Parameter, the user sets delta to a perturbation of the parameter's value; derivative() then reports the predicted change in each Variable's optimal value as delta(variable).

Usage

delta(x)

delta(x) <- value

Arguments

x

A Variable or Parameter.

value

A numeric array of the same shape as x, or NULL.

Value

The perturbation (numeric array) or NULL.


CVXR documentation built on Aug. 24, 2026, 9:10 a.m.