Learn R Programming

CVXR (version 0.99-7)

LogSumExp-class: The LogSumExp class.

Description

The natural logarithm of the sum of the elementwise exponential, \(\log\sum_{i=1}^n e^{x_i}\).

Usage

LogSumExp(x, axis = NA_real_)

# S4 method for LogSumExp to_numeric(object, values)

# S4 method for LogSumExp sign_from_args(object)

# S4 method for LogSumExp is_atom_convex(object)

# S4 method for LogSumExp is_atom_concave(object)

# S4 method for LogSumExp is_incr(object, idx)

# S4 method for LogSumExp is_decr(object, idx)

# S4 method for LogSumExp graph_implementation(object, arg_objs, size, data = NA_real_)

Arguments

x

An '>Expression representing a vector or matrix.

axis

(Optional) The dimension across which to apply the function: 1 indicates rows, 2 indicates columns, and NA indicates rows and columns. The default is NA.

object

A '>LogSumExp object.

values

A list of arguments to the atom.

idx

An index into the atom.

arg_objs

A list of linear expressions for each argument.

size

A vector with two elements representing the size of the resulting expression.

data

A list of additional data required by the atom.

Methods (by generic)

  • to_numeric: Evaluates \(e^x\) elementwise, sums, and takes the natural log.

  • sign_from_args: The atom is positive.

  • is_atom_convex: The atom is convex.

  • is_atom_concave: The atom is not concave.

  • is_incr: The atom is monotonically non-decreasing.

  • is_decr: The atom is not monotonically non-increasing.

  • graph_implementation: The graph implementation of the atom.

Slots

x

An '>Expression representing a vector or matrix.

axis

(Optional) The dimension across which to apply the function: 1 indicates rows, 2 indicates columns, and NA indicates rows and columns. The default is NA.