entr: Entropy Function

entrR Documentation

Entropy Function

Description

The elementwise entropy function, -xlog(x).

Usage

entr(x)

Arguments

x

An Expression, vector, or matrix.

Value

An Expression representing the entropy of the input.

Examples

x <- Variable(5)
obj <- Maximize(sum(entr(x)))
prob <- Problem(obj, list(sum(x) == 1))
result <- solve(prob)
result$getValue(x)

anqif/CVXR documentation built on Feb. 6, 2024, 4:28 a.m.