Learn R Programming

CVXR (version 0.99-7)

CallbackParam-class: The CallbackParam class.

Description

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

Usage

CallbackParam(callback, rows = 1, cols = 1, name = NA_character_,
  sign = UNKNOWN)

# S4 method for CallbackParam value(object)

# S4 method for CallbackParam get_data(object)

Arguments

callback

A numeric element, vector, matrix, or data.frame

rows

The number of rows in the parameter.

cols

The number of columns in the parameter.

name

(Optional) A character string representing the name of the parameter.

sign

A character string indicating the sign of the parameter. Must be "ZERO", "POSITIVE", "NEGATIVE", or "UNKNOWN".

object

A '>CallbackParam object.

Methods (by generic)

  • get_data: Returns list(callback, rows, cols, name, sign string).

Slots

callback

A numeric element, vector, matrix, or data.frame.

Examples

Run this code
# NOT RUN {
x <- Variable(2)
dim <- size(x)
y <- CallbackParam(value(x), dim[1], dim[2], sign = "POSITIVE")
get_data(y)
# }

Run the code above in your browser using DataLab