Learn R Programming

editrules (version 2.9.5)

getAb: Returns augmented matrix representation of edit set.

Description

For a system of linear (in)equations of the form \(Ax \odot b\), \(\odot\in\{<,\leq,=\}\), the matrix \(A|b\) is called the augmented matrix.

Usage

getAb(E)

Value

numeric matrix A|b

Arguments

E

editmatrix

See Also

editmatrix as.matrix.editmatrix

Examples

Run this code

E <- editmatrix(c( "x+3*y == 2*z"
                 , "x > 2")
                 )
print(E)
                 
# get editrules, useful for storing and maintaining the rules external from your script
as.data.frame(E)
                 
# get coeficient matrix of inequalities
getA(E)

# get augmented matrix of linear edit set
getAb(E)

# get constants of inequalities (i.e. c(0, 2))                
getb(E)

# get operators of inequalities (i.e. c("==",">"))
getOps(E)

# get variables of inequalities (i.e. c("x","y","z"))
getVars(E)

# isNormalized
isNormalized(E)

#normalized E
E <- normalize(E)
E

# is het now normalized?
isNormalized(E)

Run the code above in your browser using DataLab