Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

one_minus_pos

Difference on Restricted Domain


Description

The difference 1 - x with domain \{x : 0 < x < 1\}.

Usage

one_minus_pos(x)

Arguments

x

An Expression, vector, or matrix.

Details

This atom is log-log concave.

Value

An Expression representing one minus the input restricted to (0,1).

Examples

x <- Variable(pos = TRUE)
y <- Variable(pos = TRUE)
prob <- Problem(Maximize(one_minus_pos(x*y)), list(x <= 2 * y^2, y >= .2))
result <- solve(prob, gp = TRUE)
result$value
result$getValue(x)
result$getValue(y)

CVXR

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.