Learn R Programming

convexjlr (version 0.5.1)

value: Get values of expressions at optimizer

Description

Value returns the values of expressions at optimizer (minimizer, maximizer and etc.).

Usage

value(...)

Arguments

...

expressions needed to evaluate.

Examples

Run this code
# NOT RUN {
if (setup()) {
    x <- Variable(4)
    b <- J(c(1:4))
    p <- minimize(sum((x - b) ^ 2))
    cvx_optim(p)
    value(x[1] + x[2], x[3] + x[4])
}
# }

Run the code above in your browser using DataLab