This function is deprecated. Please use function sparse_constraints
from package
lintools
instead.
sparseConstraints(x, ...)# S3 method for editmatrix
sparseConstraints(x, tol = 1e-08, ...)
# S3 method for matrix
sparseConstraints(x, b, neq = length(b), tol = 1e-08, ...)
# S3 method for data.frame
sparseConstraints(
x,
b,
neq = length(b),
base = min(x[, 2]),
sorted = FALSE,
...
)
# S3 method for sparseConstraints
print(x, range = 1L:10L, ...)
Object of class sparseConstraints
(see details).
R object to be translated to sparseConstraints format.
options to be passed to other methods
Tolerance for testing where coefficients are zero
Constant vector
The first new
equations are interpreted as equality constraints, the rest as '<='
are the indices in x[,1:2]
base 0 or base 1?
is x
sorted by the first column?
integer vector stating which constraints to print
The sparseConstraints
objects holds the system \(\boldsymbol{Ax}\leq \boldsymbol{b}\)
in column sparse format, outside of R
's memory. In R
, it is a reference object.
In particular, it is meaningless to
Copy the object. You only will only generate a pointer to physically the same object.
Save the object. The physical object is destroyed when R
closes, or when R
's
garbage collector cleans up a removed sparseConstraints
object.