abs,Expression-method {CVXR} | R Documentation |
Absolute Value
Description
The elementwise absolute value.
Usage
## S4 method for signature 'Expression'
abs(x)
Arguments
x |
An Expression. |
Value
An Expression representing the absolute value of the input.
Examples
A <- Variable(2,2)
prob <- Problem(Minimize(sum(abs(A))), list(A <= -2))
result <- solve(prob)
result$value
result$getValue(A)
[Package CVXR version 1.0-14 Index]