R/Hreprrational.R

Defines functions Hreprrational

Documented in Hreprrational

Hreprrational <- function(pts) { ## input numeric or rational, output rational
  #print(nrow)
  colNames <- colnames(pts)
  if(inherits(pts[1],"character")) {
    foo <- cbind("0", "1", pts)
  } else {
    # it's important to use rationals in scdd.
    ###########   nr <- nrow(pts)
    foo <- cbind(0, 1, pts)
    foo <- d2q(foo)
  }
  foorational <- scdd(foo, representation = "V", roworder="maxcutoff")$output # H repr from V repr.
  if (!is.null(colNames)) colnames(foorational) <- c("eq", "b", colNames) ## not very useful ?
  return(foorational)
}

Try the blackbox package in your browser

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

blackbox documentation built on May 3, 2023, 9:13 a.m.