normalize {lintools} | R Documentation |
Bring a system of (in)equalities in a standard form
Description
Bring a system of (in)equalities in a standard form
Usage
normalize(A, b, operators, unit = 0)
Arguments
A |
|
b |
|
operators |
|
unit |
|
Value
A list
with the folowing components
A
: theA
corresponding to the normalized sytem.b
: the constant vector corresponding to the normalized systemneq
: the number of equationsnleq
: the number of non-strict inequations (<=)order
: the index vector used to permute the original rows ofA
.
Details
For this package, a set of equations is in normal form when
The first
neq
rows represent linear equalities.The next
nleq
rows represent inequalities of the forma.x <= b
All other rows are strict inequalities of the form
a.x < b
If unit>0
, the strict inequalities a.x < b
are replaced with
inequations of the form a.x <= b-unit
, where unit
represents
the precision of measurement.
Examples
A <- matrix(1:12,nrow=4)
b <- 1:4
ops <- c("<=","==","==","<")
normalize(A,b,ops)
normalize(A,b,ops,unit=0.1)