R/get.constr.type.R

Defines functions get.constr.type

Documented in get.constr.type

get.constr.type <- function(lprec, constraints = 1:m, as.char = TRUE) {
  m <- dim(lprec)[1]

  if (m < 1) {
    constraints <- integer(0)
  }

  types <- .Call(RlpSolve_get_constr_type, lprec, as.integer(constraints))

  if (as.char) {
    types <- c("free", "<=", ">=", "=")[types + 1]
  }

  types
}

Try the lpSolveAPI package in your browser

Any scripts or data that you put into this service are public.

lpSolveAPI documentation built on Feb. 13, 2026, 5:10 p.m.