Description Usage Arguments Value Author(s) Examples
Build the linear system of inequalities given specific bounds.
1 2 3 4 5 6 7 8 | bounds2lineqSys(
d = nrow(A),
l = 0,
u = 1,
A = diag(d),
lineqSysType = "twosides",
rmInf = TRUE
)
|
d |
the number of linear inequality constraints. |
l |
the value (or vector) with the lower bound. |
u |
the value (or vector) with the upper bound. |
A |
a matrix containing the structure of the linear equations. |
lineqSysType |
a character string corresponding to the type of the
linear system. Options: l ≤ A x ≤ u. - M x + g ≥ 0 with M = [A, -A]^T and g = [-l, u]^T. |
rmInf |
If |
A list with the linear system of inequalities:
list(A,l,u)
(twosides
) or list(M,g)
(oneside
).
A. F. Lopez-Lopera.
1 2 3 4 5 6 7 | n <- 5
A <- diag(n)
l <- rep(0, n)
u <- c(Inf, rep(1, n-1))
bounds2lineqSys(n, l, u, A, lineqSysType = "twosides")
bounds2lineqSys(n, l, u, A, lineqSysType = "oneside", rmInf = FALSE)
bounds2lineqSys(n, l, u, A, lineqSysType = "oneside", rmInf = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.