Learn R Programming

CVXR (version 0.99-7)

Expression-class: The Expression class.

Description

This class represents a mathematical expression.

Usage

# S4 method for Expression
value(object)

# S4 method for Expression grad(object)

# S4 method for Expression domain(object)

# S4 method for Expression as.character(x)

# S4 method for Expression name(object)

# S4 method for Expression curvature(object)

# S4 method for Expression is_constant(object)

# S4 method for Expression is_affine(object)

# S4 method for Expression is_convex(object)

# S4 method for Expression is_concave(object)

# S4 method for Expression is_dcp(object)

# S4 method for Expression is_quadratic(object)

# S4 method for Expression is_pwl(object)

# S4 method for Expression is_zero(object)

# S4 method for Expression is_positive(object)

# S4 method for Expression is_negative(object)

# S4 method for Expression size(object)

# S4 method for Expression is_scalar(object)

# S4 method for Expression is_vector(object)

# S4 method for Expression is_matrix(object)

# S4 method for Expression nrow(x)

# S4 method for Expression ncol(x)

Arguments

x, object

An '>Expression object.

Methods (by generic)

  • value: The value of the expression.

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

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

  • name: The string representation of the expression.

  • curvature: The curvature of the expression.

  • is_constant: The expression is constant if it contains no variables or is identically zero.

  • is_affine: The expression is affine if it is constant or both convex and concave.

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

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

  • is_dcp: The expression is DCP if it is convex or concave.

  • is_quadratic: A logical value indicating whether the expression is quadratic.

  • is_pwl: A logical value indicating whether the expression is piecewise linear.

  • is_zero: The expression is zero if it is both positive and negative.

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

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

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

  • is_scalar: The expression is scalar if rows = cols = 1.

  • is_vector: The expression is a vector if min(rows, cols) = 1.

  • is_matrix: The expression is a matrix if rows > 1 and cols > 1.

  • nrow: Number of rows in the expression.

  • ncol: Number of columns in the expression.