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

[numeric] Matrix

b

[numeric] vector

operators

[character] operators in {<,<=,==,>=,>}.

unit

[numeric] (nonnegative) Your unit of measurement. This is used to replace strict inequations of the form a.x < b with a.x <= b-unit. Typically, unit is related to the units in which your data is measured. If unit is 0, inequations are not replaced.

Value

A list with the folowing components

Details

For this package, a set of equations is in normal form when

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)


[Package lintools version 0.1.7 Index]