Create variable (vector, matrix, semidefinite matrix and etc.) for optimization problem.

Variable(size = 1, sign = c("None", "Positive", "Negative"))

Semidefinite(size = 1, sign = c("None", "Positive", "Negative"))

Arguments

size

variable size.

sign

whether variable is element-wise positive, element-wise negative or neither.

Examples

# NOT RUN {
    convex_setup()
    x <- Variable(4)
    X <- Variable(c(4, 4), sign = "Positive")
    S <- Semidefinite(4)
# }