Leaf-class {CVXR} | R Documentation |
The Leaf class.
Description
This class represents a leaf node, i.e. a Variable, Constant, or Parameter.
Usage
## S4 method for signature 'Leaf'
get_data(object)
## S4 method for signature 'Leaf'
dim(x)
## S4 method for signature 'Leaf'
variables(object)
## S4 method for signature 'Leaf'
parameters(object)
## S4 method for signature 'Leaf'
constants(object)
## S4 method for signature 'Leaf'
atoms(object)
## S4 method for signature 'Leaf'
is_convex(object)
## S4 method for signature 'Leaf'
is_concave(object)
## S4 method for signature 'Leaf'
is_log_log_convex(object)
## S4 method for signature 'Leaf'
is_log_log_concave(object)
## S4 method for signature 'Leaf'
is_nonneg(object)
## S4 method for signature 'Leaf'
is_nonpos(object)
## S4 method for signature 'Leaf'
is_pos(object)
## S4 method for signature 'Leaf'
is_neg(object)
## S4 method for signature 'Leaf'
is_hermitian(object)
## S4 method for signature 'Leaf'
is_symmetric(object)
## S4 method for signature 'Leaf'
is_imag(object)
## S4 method for signature 'Leaf'
is_complex(object)
## S4 method for signature 'Leaf'
domain(object)
## S4 method for signature 'Leaf'
project(object, value)
## S4 method for signature 'Leaf'
project_and_assign(object, value)
## S4 method for signature 'Leaf'
value(object)
## S4 replacement method for signature 'Leaf'
value(object) <- value
## S4 method for signature 'Leaf'
validate_val(object, val)
## S4 method for signature 'Leaf'
is_psd(object)
## S4 method for signature 'Leaf'
is_nsd(object)
## S4 method for signature 'Leaf'
is_quadratic(object)
## S4 method for signature 'Leaf'
is_pwl(object)
Arguments
object , x |
A Leaf object. |
value |
A numeric scalar, vector, or matrix. |
val |
The assigned value. |
Methods (by generic)
-
get_data(Leaf)
: Leaves are not copied. -
dim(Leaf)
: The dimensions of the leaf node. -
variables(Leaf)
: List of Variable objects in the leaf node. -
parameters(Leaf)
: List of Parameter objects in the leaf node. -
constants(Leaf)
: List of Constant objects in the leaf node. -
atoms(Leaf)
: List of Atom objects in the leaf node. -
is_convex(Leaf)
: A logical value indicating whether the leaf node is convex. -
is_concave(Leaf)
: A logical value indicating whether the leaf node is concave. -
is_log_log_convex(Leaf)
: Is the expression log-log convex? -
is_log_log_concave(Leaf)
: Is the expression log-log concave? -
is_nonneg(Leaf)
: A logical value indicating whether the leaf node is nonnegative. -
is_nonpos(Leaf)
: A logical value indicating whether the leaf node is nonpositive. -
is_pos(Leaf)
: Is the expression positive? -
is_neg(Leaf)
: Is the expression negative? -
is_hermitian(Leaf)
: A logical value indicating whether the leaf node is hermitian. -
is_symmetric(Leaf)
: A logical value indicating whether the leaf node is symmetric. -
is_imag(Leaf)
: A logical value indicating whether the leaf node is imaginary. -
is_complex(Leaf)
: A logical value indicating whether the leaf node is complex. -
domain(Leaf)
: A list of constraints describing the closure of the region where the leaf node is finite. Default is the full domain. -
project(Leaf)
: Project value onto the attribute set of the leaf. -
project_and_assign(Leaf)
: Project and assign a value to the leaf. -
value(Leaf)
: Get the value of the leaf. -
value(Leaf) <- value
: Set the value of the leaf. -
validate_val(Leaf)
: Check thatval
satisfies symbolic attributes of leaf. -
is_psd(Leaf)
: A logical value indicating whether the leaf node is a positive semidefinite matrix. -
is_nsd(Leaf)
: A logical value indicating whether the leaf node is a negative semidefinite matrix. -
is_quadratic(Leaf)
: Leaf nodes are always quadratic. -
is_pwl(Leaf)
: Leaf nodes are always piecewise linear.
Slots
id
(Internal) A unique integer identification number used internally.
dim
The dimensions of the leaf.
value
The numeric value of the leaf.
nonneg
Is the leaf nonnegative?
nonpos
Is the leaf nonpositive?
complex
Is the leaf a complex number?
imag
Is the leaf imaginary?
symmetric
Is the leaf a symmetric matrix?
diag
Is the leaf a diagonal matrix?
PSD
Is the leaf positive semidefinite?
NSD
Is the leaf negative semidefinite?
hermitian
Is the leaf hermitian?
boolean
Is the leaf boolean? Is the variable boolean? May be
TRUE
= entire leaf is boolean,FALSE
= entire leaf is not boolean, or a vector of indices which should be constrained as boolean, where each index is a vector of length exactly equal to the length ofdim
.integer
Is the leaf integer? The semantics are the same as the
boolean
argument.sparsity
A matrix representing the fixed sparsity pattern of the leaf.
pos
Is the leaf strictly positive?
neg
Is the leaf strictly negative?