eliminateRedundant | R Documentation |
Given a set of linear constraints, gives a subset of these constraints that are non-redundant.
eliminateRedundant(constr)
constr |
Constraints |
If no constraints are redundant, returns the same set of constraints.
A set of non-redundant constraints.
Gert van Valkenhoef, Tommi Tervonen
harConstraints
constr <- list( constr = rbind( c(-1 , 0), c( 0 , -1), c( 1 , 1), c( 0.5, -1)), dir = c('<=', '<=', '=', '<='), rhs = c(0, 0, 1, 0)) constr <- eliminateRedundant(constr) stopifnot(nrow(constr$constr) == 3) # eliminates one constraint
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.