one_minus_pos function

Difference on Restricted Domain

Difference on Restricted Domain

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

one_minus_pos(x)

Arguments

  • x: An Expression , vector, or matrix.

Returns

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

Details

This atom is log-log concave.

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)
  • Maintainer: Anqi Fu
  • License: Apache License 2.0 | file LICENSE
  • Last published: 2024-11-07