Learn R Programming

CVXR (version 0.99-7)

Atom-class: The Atom class.

Description

This virtual class represents atomic expressions in CVXR.

Usage

# S4 method for Atom
validate_args(object)

# S4 method for Atom size(object)

# S4 method for Atom dim(x)

# S4 method for Atom nrow(x)

# S4 method for Atom ncol(x)

# S4 method for Atom is_positive(object)

# S4 method for Atom is_negative(object)

# S4 method for Atom is_convex(object)

# S4 method for Atom is_concave(object)

# S4 method for Atom canonicalize(object)

# S4 method for Atom graph_implementation(object, arg_objs, size, data = NA_real_)

# S4 method for Atom variables(object)

# S4 method for Atom parameters(object)

# S4 method for Atom constants(object)

# S4 method for Atom value(object)

# S4 method for Atom grad(object)

# S4 method for Atom domain(object)

Arguments

x, object

An '>Atom object.

arg_objs

A list of linear expressions for each argument.

size

A vector with two elements representing the size of the resulting expression.

data

A list of additional data required by the atom.

Methods (by generic)

  • validate_args: Raises an error if the arguments are invalid.

  • size: The c(row, col) dimensions of the atom.

  • dim: The c(row, col) dimensions of the atom.

  • nrow: The number of rows in the atom.

  • ncol: The number of columns in the atom.

  • is_positive: A logical value indicating whether the atom is positive.

  • is_negative: A logical value indicating whether the atom is negative.

  • is_convex: A logical value indicating whether the atom is convex.

  • is_concave: A logical value indicating whether the atom is concave.

  • canonicalize: Represent the atom as an affine objective and conic constraints.

  • graph_implementation: The graph implementation of the atom.

  • variables: List of '>Variable objects in the atom.

  • parameters: List of '>Parameter objects in the atom.

  • constants: List of '>Constant objects in the atom.

  • value: The value of the atom.

  • grad: The (sub/super)-gradient of the atom with respect to each variable.

  • domain: A list of constraints describing the closure of the region where the expression is finite.