Power-class {CVXR}R Documentation

The Power class.

Description

This class represents the elementwise power function f(x)=xpf(x) = x^p. If expr is a CVXR expression, then expr^p is equivalent to Power(expr, p).

Usage

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)

Arguments

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 arguments

idx

An index into the atom.

args

A list of arguments to reconstruct the atom. If args=NULL, use the current args of the atom

id_objects

Currently unused.

Details

For p=0p = 0, f(x)=1f(x) = 1, constant, positive.

For p=1p = 1, f(x)=xf(x) = x, affine, increasing, same sign as xx.

For p=2,4,8,...p = 2,4,8,..., f(x)=xpf(x) = |x|^p, convex, signed monotonicity, positive.

For p<0p < 0 and f(x)=f(x) =

xpx^p

for x>0x > 0

++\infty

x0x \leq 0

, this function is convex, decreasing, and positive.

For 0<p<10 < p < 1 and f(x)=f(x) =

xpx^p

for x0x \geq 0

-\infty

x<0x < 0

, this function is concave, increasing, and positive.

For p>1,p2,4,8,p > 1, p \neq 2,4,8,\ldots and f(x)=f(x) =

xpx^p

for x0x \geq 0

++\infty

x<0x < 0

, this function is convex, increasing, and positive.

Methods (by generic)

Slots

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.


[Package CVXR version 1.0-14 Index]