This class represents a mathematical expression.
# 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(x)
# S4 method for Expression
expr(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_log_log_constant(object)
# S4 method for Expression
is_log_log_affine(object)
# S4 method for Expression
is_log_log_convex(object)
# S4 method for Expression
is_log_log_concave(object)
# S4 method for Expression
is_dgp(object)
# S4 method for Expression
is_hermitian(object)
# S4 method for Expression
is_psd(object)
# S4 method for Expression
is_nsd(object)
# S4 method for Expression
is_quadratic(object)
# S4 method for Expression
is_symmetric(object)
# S4 method for Expression
is_pwl(object)
# S4 method for Expression
is_qpwa(object)
# S4 method for Expression
is_zero(object)
# S4 method for Expression
is_nonneg(object)
# S4 method for Expression
is_nonpos(object)
# S4 method for Expression
dim(x)
# S4 method for Expression
is_real(object)
# S4 method for Expression
is_imag(object)
# S4 method for Expression
is_complex(object)
# S4 method for Expression
size(object)
# S4 method for Expression
ndim(object)
# S4 method for Expression
flatten(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)
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.
as.character: The string representation of the expression.
name: The name of the expression.
expr: The expression itself.
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_log_log_constant: Is the expression log-log constant, i.e., elementwise positive?
is_log_log_affine: Is the expression log-log affine?
is_log_log_convex: Is the expression log-log convex?
is_log_log_concave: Is the expression log-log concave?
is_dgp: The expression is DGP if it is log-log DCP.
is_hermitian: A logical value indicating whether the expression is a Hermitian matrix.
is_psd: A logical value indicating whether the expression is a positive semidefinite matrix.
is_nsd: A logical value indicating whether the expression is a negative semidefinite matrix.
is_quadratic: A logical value indicating whether the expression is quadratic.
is_symmetric: A logical value indicating whether the expression is symmetric.
is_pwl: A logical value indicating whether the expression is piecewise linear.
is_qpwa: A logical value indicating whether the expression is quadratic of piecewise affine.
is_zero: The expression is zero if it is both nonnegative and nonpositive.
is_nonneg: A logical value indicating whether the expression is nonnegative.
is_nonpos: A logical value indicating whether the expression is nonpositive.
dim: The c(row, col) dimensions of the expression.
is_real: A logical value indicating whether the expression is real.
is_imag: A logical value indicating whether the expression is imaginary.
is_complex: A logical value indicating whether the expression is complex.
size: The number of entries in the expression.
ndim: The number of dimensions of the expression.
flatten: Vectorizes the expression.
is_scalar: A logical value indicating whether the expression is a scalar.
is_vector: A logical value indicating whether the expression is a row or column vector.
is_matrix: A logical value indicating whether the expression is a matrix.
nrow: Number of rows in the expression.
ncol: Number of columns in the expression.