R/get.type.R

Defines functions get.type

Documented in get.type

get.type <- function(lprec, columns = 1:n, as.char = TRUE) {
  n <- dim(lprec)[2]

  if (n < 1) {
    columns <- integer(0)
  }

  ind <- .Call(RlpSolve_is_int, lprec, as.integer(columns))

  if (as.char) {
    types <- rep("real", length(columns))
    types[ind] <- "integer"
  } else {
    types <- ind
  }

  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.