Elementwise Positive
The elementwise positive portion of an expression, . This is equivalent to max_elemwise(x,0)
.
methods
pos(x)
x
: An Expression , vector, or matrix.An Expression representing the positive portion of the input.
x <- Variable(2) val <- matrix(c(-3,2)) prob <- Problem(Minimize(pos(x)[1]), list(x == val)) result <- solve(prob) result$value