R/gptk_gpBlockIndices.R

Defines functions .gpBlockIndices

.gpBlockIndices <-
function(model, blockNo) {
  if (model$approx != "pitc")
    stop("Block number only relevant for pitc approximation.")
  else {
    if (blockNo == 1)
      startVal = 1
    else
      startVal = model$blockEnd[blockNo-1]+1
    
    endVal = model$blockEnd[blockNo]
    ind = startVal:endVal
  }

  return(ind)
}

Try the robin package in your browser

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

robin documentation built on May 17, 2022, 1:07 a.m.