R/s2band.R

Defines functions .s2band

.s2band <- function(A, B) {
  B  <- as.matrix(B)
  p  <- ncol(A)

  AB <- rbind(matrix(data=0, nrow = 2, ncol = p), A)

  sol <-.Fortran("dgbsv", p, 2L, 2L, NCOL(B),
                 AB = AB, LDAB = nrow(AB),
                 ipiv = rep(0L, p), B = B, 
                 LDB = p, info = 0L, 
                 PACKAGE = 'baseline')
  return(sol$B)
}

Try the baseline package in your browser

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

baseline documentation built on June 8, 2025, 1:24 p.m.