sparseConstraints: DEPRECATED Generate sparse set of constraints.

View source: R/sparseConstraints.R

sparseConstraintsR Documentation

DEPRECATED Generate sparse set of constraints.

Description

This function is deprecated. Please use function sparse_constraints from package lintools instead.

Usage

sparseConstraints(x, ...)

## S3 method for class 'editmatrix'
sparseConstraints(x, tol = 1e-08, ...)

## S3 method for class 'matrix'
sparseConstraints(x, b, neq = length(b), tol = 1e-08, ...)

## S3 method for class 'data.frame'
sparseConstraints(
  x,
  b,
  neq = length(b),
  base = min(x[, 2]),
  sorted = FALSE,
  ...
)

## S3 method for class 'sparseConstraints'
print(x, range = 1L:10L, ...)

Arguments

x

R object to be translated to sparseConstraints format.

...

options to be passed to other methods

tol

Tolerance for testing where coefficients are zero

b

Constant vector

neq

The first new equations are interpreted as equality constraints, the rest as '<='

base

are the indices in x[,1:2] base 0 or base 1?

sorted

is x sorted by the first column?

range

integer vector stating which constraints to print

Value

Object of class sparseConstraints (see details).

Details

The sparseConstraints objects holds the system \boldsymbol{Ax}≤q \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.


rspa documentation built on Dec. 28, 2022, 1:09 a.m.