The Power class.
This class represents the elementwise power function . If expr
is a CVXR expression, then expr^p
is equivalent to Power(expr, p)
.
class
Power(x, p, max_denom = 1024) ## S4 method for signature 'Power' to_numeric(object, values) ## S4 method for signature 'Power' sign_from_args(object) ## S4 method for signature 'Power' is_atom_convex(object) ## S4 method for signature 'Power' is_atom_concave(object) ## S4 method for signature 'Power' is_atom_log_log_convex(object) ## S4 method for signature 'Power' is_atom_log_log_concave(object) ## S4 method for signature 'Power' is_constant(object) ## S4 method for signature 'Power' is_incr(object, idx) ## S4 method for signature 'Power' is_decr(object, idx) ## S4 method for signature 'Power' is_quadratic(object) ## S4 method for signature 'Power' is_qpwa(object) ## S4 method for signature 'Power' .grad(object, values) ## S4 method for signature 'Power' .domain(object) ## S4 method for signature 'Power' get_data(object) ## S4 method for signature 'Power' copy(object, args = NULL, id_objects = list()) ## S4 method for signature 'Power' name(x)
x
: The Expression to be raised to a power.p
: A numeric value indicating the scalar power.max_denom
: The maximum denominator considered in forming a rational approximation of p
.object
: A Power object.values
: A list of numeric values for the argumentsidx
: An index into the atom.args
: A list of arguments to reconstruct the atom. If args=NULL, use the current args of the atomid_objects
: Currently unused.For , , constant, positive.
For , , affine, increasing, same sign as .
For , , convex, signed monotonicity, positive.
For and
, this function is convex, decreasing, and positive.
For and
, this function is concave, increasing, and positive.
For and
, this function is convex, increasing, and positive.
to_numeric(Power)
: Throw an error if the power is negative and cannot be handled.sign_from_args(Power)
: The sign of the atom.is_atom_convex(Power)
: Is or ?is_atom_concave(Power)
: Is or ?is_atom_log_log_convex(Power)
: Is the atom log-log convex?is_atom_log_log_concave(Power)
: Is the atom log-log concave?is_constant(Power)
: A logical value indicating whether the atom is constant.is_incr(Power)
: A logical value indicating whether the atom is weakly increasing.is_decr(Power)
: A logical value indicating whether the atom is weakly decreasing.is_quadratic(Power)
: A logical value indicating whether the atom is quadratic.is_qpwa(Power)
: A logical value indicating whether the atom is quadratic of piecewise affine..grad(Power)
: Gives the (sub/super)gradient of the atom w.r.t. each variable.domain(Power)
: Returns constraints describng the domain of the nodeget_data(Power)
: A list containing the output of pow_low, pow_mid
, or pow_high
depending on the input power.copy(Power)
: Returns a shallow copy of the power atomname(Power)
: Returns the expression in string form.x
: The Expression to be raised to a power.p
: A numeric value indicating the scalar power.max_denom
: The maximum denominator considered in forming a rational approximation of p
.