Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CallbackParam-class

The CallbackParam class.


Description

This class represents a parameter whose value is obtained by evaluating a function.

Usage

CallbackParam(callback, dim = NULL, ...)

## S4 method for signature 'CallbackParam'
value(object)

Arguments

callback

A callback function that generates the parameter value.

dim

The dimensions of the parameter.

...

Additional attribute arguments. See Leaf for details.

object

A CallbackParam object.

Slots

callback

A callback function that generates the parameter value.

dim

The dimensions of the parameter.

Examples

x <- Variable(2)
fun <- function() { value(x) }
y <- CallbackParam(fun, dim(x), nonneg = TRUE)
get_data(y)

CVXR

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.