picos.expressions.exp_logsumexp

Implements LogSumExp.

Classes

class picos.expressions.exp_logsumexp.LogSumExp(x)[source]

Bases: Expression

Logarithm of the sum of elementwise exponentials of an expression.

Definition

For an n-dimensional real affine expression x, this is the logarithm of the sum of elementwise exponentials

\log\sum_{i = 1}^n \exp(\operatorname{vec}(x)_i).

__add__(other)[source]

Denote addition with another expression on the right-hand side.

__init__(x)[source]

Construct a LogSumExp.

Parameters

x (AffineExpression) – The affine expression x.

__le__(other)[source]

Return a constraint that the expression is upper-bounded.

__radd__(other)[source]

Denote addition with another expression on the left-hand side.

__sub__(other)[source]

Denote subtraction of another expression from the expression.

property exp[source]

The elementwise sum of exponentials of x.

property n

Length of x.

property x

The expression x.