Learn R Programming

CVXR (version 0.99-7)

Square-class: The Square class.

Description

This class represents the elementwise square \(x^2\).

Usage

Square(x)

# S4 method for Square validate_args(object)

# S4 method for Square to_numeric(object, values)

# S4 method for Square get_data(object)

# S4 method for Square sign_from_args(object)

# S4 method for Square is_atom_convex(object)

# S4 method for Square is_atom_concave(object)

# S4 method for Square is_incr(object, idx)

# S4 method for Square is_decr(object, idx)

# S4 method for Square is_quadratic(object)

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

Arguments

x

An '>Expression object.

object

A '>Square object.

values

A list of arguments to the atom.

idx

An index into the atom.

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: Verification of arguments happens during initialization.

  • to_numeric: The elementwise square of the input value.

  • get_data: A list containing the output of pow_high.

  • sign_from_args: The atom is positive.

  • is_atom_convex: The atom is convex.

  • is_atom_concave: The atom is not concave.

  • is_incr: A logical value indicating whether the atom is weakly increasing.

  • is_decr: A logical value indicating whether the atom is weakly decreasing.

  • is_quadratic: Is x affine?

  • graph_implementation: The graph implementation of the atom.

Slots

x

An '>Expression object.